Strange behavior of ComboBox

The ComboBox works this way in the demo as well as in my application, so I
guess that's just the way it is, but it seems strange to me. When you
first run the demo, the text box contains "default value". Click on the
down arrow and a list of choices appears. Click on the down arrow again
(without making a selection) and the text box is cleared. I would expect
the text box to retain its original value because I didn't make a
selection. Failing that, I would expect to get EVT_TEXT because the text
changed. As far as I can tell, the clearing of the ComboBox text is not
accompanied by any event. I experience this behavior on Windows XP. Does
the ComboBox work differently on other platforms? The behavior on Windows
is a pain because I can't assume that the text box will contain the default
value so I have to test for null value everywhere and reassert the default
value.

···

--
Jeffrey Barish

Jeffrey Barish wrote:

The ComboBox works this way in the demo as well as in my application, so I
guess that's just the way it is, but it seems strange to me. When you
first run the demo, the text box contains "default value". Click on the
down arrow and a list of choices appears. Click on the down arrow again
(without making a selection) and the text box is cleared. I would expect
the text box to retain its original value because I didn't make a
selection.

That's the way that it works on Linux. I would expect it to work that way on Windows too, so go ahead and create a bug report about this with a category of wxMSW Specific.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!