I’m currently working with a (subclassed) wx.VListBox control. The docs say it sends wx.EVT_LISTBOX and wx.EVT_LISTBOX_DCLICK, both of which are wx.CommandEvents, just as the regular wx.ListBox control does.
However, event.GetSelection() is working, returning the correct index of the item clicked, and event.GetString(), which should be returning the string shown at the same index position within the control, is returning an empty string for the same event.
I’m using Python 2.5.1, wxPython 2.8.4.0 (msw-unicode).
I see that both GetString and GetSelection are valid only for selection events, thus here I am testing only in the context of a selection event. I do get a correct index integer from GetSelection but I get an empty string from GetString. The VListBox control is clearly showing a string at that index position, and for every currently valid index position.
Strange enough to post a test case, or does anyone have a familiar answer from a similar situation of their own?