Thippana, Prasoonadevi wrote:
Hi,
I haven't got any reply on this one.Hi I am having trouble with SetEditable(). I have a combobox and I made it readonly. And then in the function I am trying to make it editable and I am getting the error.
This is the piece of code I am trying to do.
self.combo1 = wx.ComboBox(self.mainpa,-1,"",(390,300),(95,-1),samplelist,wx.CB_DROPDOWN > wx.CB_READONLY)
And I have function like :
def OnEdit(self,evt):
self.combo1.SetEditable(True)
The Error I am getting is:
Traceback (most recent call last):
File "U:\pthippan\Python25\MESA\MESA_CODE\MESA_Project_Properites.py", line 95, in OnEdit
self.combo1.SetEditable(True)
File "C:\Python25\lib\site-packages\wx-2.8-msw-ansi\wx\_controls.py", line 712, in SetEditable
return _controls_.ComboBox_SetEditable(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "wxAssertFailure" failed at ..\..\src\msw\combobox.cpp(382) in wxComboBox::GetEditHWND(): not read only combobox without edit control?
Can somebody help me with this.
Try it without the wx.CB_READONLY style, and just do a SetEditable(False) to start with.
···
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!