change the style of combobox after creation

I have this code:

self.optionCtrl = wx.combo.ComboCtrl(self,-1, style=wx.CB_READONLY

wx.CB_DROPDOWN)

I want to be able to change its style after creation (In some cases this
list is editable and in some cases its not - the user can overwrite this
setting manualy by clicking checkbox)

I tried:
self.optionCtrl.SetEditable(True)

But it gives:
AttributeError: 'ComboCtrl' object has no attribute 'SetEditable'

I didnt find anything helpful in the documentation.

What can I do?

···

--
View this message in context: http://wxpython-users.1045709.n5.nabble.com/change-the-style-of-combobox-after-creation-tp5727018.html
Sent from the wxPython-users mailing list archive at Nabble.com.

lior wrote:

I have this code:

self.optionCtrl = wx.combo.ComboCtrl(self,-1, style=wx.CB_READONLY
>wx.CB_DROPDOWN)

I want to be able to change its style after creation (In some cases this
list is editable and in some cases its not - the user can overwrite this
setting manualy by clicking checkbox)

I tried:
self.optionCtrl.SetEditable(True)

But it gives:
AttributeError: 'ComboCtrl' object has no attribute 'SetEditable'

The combo control has two distinct parts: the dropdown menu, and the
edit control. You can access the two parts separately. I suspect that
    self.optionCtrl.GetTextCtrl().SetEditable(True)
will do what you want.

···

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Thank you!!!!
I just wish that the documentation would mention this.

···

--
View this message in context: http://wxpython-users.1045709.n5.nabble.com/change-the-style-of-combobox-after-creation-tp5727018p5727029.html
Sent from the wxPython-users mailing list archive at Nabble.com.