[wxPython-users] wxComboBox events
Werner F. Bruhin
werner.bruhin at free.fr
Thu Sep 21 06:53:05 PDT 2006
Hi Tim,
Tim Grove wrote:
> In my application, I'm using a combo box containing a list of choices,
> which consist of short character strings. What I want to be able to do
> is to display (either in a pop-up menu or some other textual display)
> a longer textual description as the user moves through each of the
> possible choices (by mouse or keyboard) before they make an actual
> selection. I just can't seem to find the right event to bind to the
> combo that will do the trick. Can anyone make any suggestions? Perhaps
> there is a more appropriate control to use to display the list of
> choices in the first case? Any help most welcome.
I do it "the other way round", i.e. the choices are the longer text and
I associate in my case the db primary key with the choice item using.
e.g.:
combobox.Append(appendString, appendClientData)
When user selects an item you use something like this to get your short
string.
combobox.GetClientData(combobox.currentSelection)
Werner
>
> Best regards,
> Tim Grove
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
>
>
>
More information about the wxpython-users
mailing list