immitation Combobox

Dear Friends of wxPython,
I have been trying to make a combobox that is droppable thru code not only a mouse click for 3 weeks. I am new to wxPython and Python but am grinding along. I’ve tried many widgets in combination, combopopup, listCtrl, Object List View, etc., all had some difficulty. Now a combobox with a ListCtrl that shows and hides almost worked but as per my last forum letter with code sample (Re: wx.EVT_SET_FOCUS Fires 2wice) the combo on SetFocus event fires the event 2 times and so i get a KillFocus event in between. Now if i get no solution or explanation of this then i will go down one step lower and use a textCtrl and ListCtrl that hides/shows.
I need some superhero help, maybe from Batman or Robin(Dunn), to find a solution or some possible paths towards one.
Because i am new i don’t know how to make a widget that will put a button or attach one next to a textCtrl so it is one widget and not 2. Thus it would fit in one gridsizer cell. This is why i am trying to use a combobox(with empty list) with a listCtrl for the actual dropdown. If i can get help about this double firing on SetFocus i will continue with it. Else i will try a textCtrl with listCtrl dropdown. For that i need to know how to combine the textCtrl and button into 1 widget.
Ok its out there. Thanks for the interest and read. I will be happy with any help or ideas. Yet i am still waiting for some superhero intervention from a caped crusader . (wakening widgets Batman! all these unholy zombie widgets are being half created and are attacking us!) Markandeya

Dear Friends of wxPython,
I have been trying to make a combobox that is droppable thru code not only a
mouse click for 3 weeks.

See this thread--as of 2006, says it maybe can't be done?
http://bytes.com/groups/python/485369-wxpython-wxcombobox-opening

But I'd wait for the next Robincycle to confirm this.

I am new to wxPython and Python but am grinding
along. I've tried many widgets in combination, combopopup, listCtrl, Object
List View, etc., all had some difficulty. Now a combobox with a ListCtrl
that shows and hides almost worked but as per my last forum letter with code
sample (Re: wx.EVT_SET_FOCUS Fires 2wice) the combo on SetFocus event fires
the event 2 times and so i get a KillFocus event in between.

How does that--the KillFocus event cause a problem for what you are doing?

Because i am new i don't know how to make a widget that will put a button
or attach one next to a textCtrl so it is one widget and not 2. Thus it
would fit in one gridsizer cell.

Maybe helpful:
http://wiki.wxpython.org/CreatingCustomControls

Che

···

On Fri, May 15, 2009 at 12:15 AM, Markandeya <mrc55519@gmail.com> wrote:

Markandeya wrote:

Dear Friends of wxPython,
I have been trying to make a combobox that is droppable thru code not only a mouse click for 3 weeks.

As mentioned in my other message, if you don't absolutely need to have the programatic control of the drop-down then the native Windows/GTK widgets can do it already. You just need to teach your users what the keystroke is. I suspect that if you also need it on the Mac and if your users are hard-core Apple-ites then they would probably lynch you if you tried to auto popup the dropdown window, so it's probably not as important there. :wink:

I am new to wxPython and Python but am grinding along. I've tried many widgets in combination, combopopup, listCtrl, Object List View, etc., all had some difficulty. Now a combobox with a ListCtrl that shows and hides almost worked but as per my last forum letter with code sample (Re: wx.EVT_SET_FOCUS Fires 2wice) the combo on SetFocus event fires the event 2 times and so i get a KillFocus event in between. Now if i get no solution or explanation of this then i will go down one step lower and use a textCtrl and ListCtrl that hides/shows.
  I need some superhero help, maybe from Batman or Robin(Dunn), to find a solution or some possible paths towards one.
  Because i am new i don't know how to make a widget that will put a button or attach one next to a textCtrl so it is one widget and not 2. Thus it would fit in one gridsizer cell. This is why i am trying to use a combobox(with empty list) with a listCtrl for the actual dropdown. If i can get help about this double firing on SetFocus i will continue with it. Else i will try a textCtrl with listCtrl dropdown. For that i need to know how to combine the textCtrl and button into 1 widget.
  Ok its out there. Thanks for the interest and read. I will be happy with any help or ideas. Yet i am still waiting for some superhero intervention from a caped crusader . (wakening widgets Batman! all these unholy zombie widgets are being half created and are attacking us!)

I'm not sure if it still works, but have you seen this? http://wiki.wxpython.org/TextCtrlAutoComplete

···

--
Robin Dunn
Software Craftsman