--
Please read http://www.wxwidgets.org/support/mlhowto.htm
before posting.
To unsubscribe, send email to
wx-users+u...@googlegroups.com
or visit http://groups.google.com/group/wx-users
--
This message has been scanned for viruses and
dangerous content by
MailScanner,
and is
believed to be clean.
Hi,
I ran into the same problem a while ago. I developed a work around,
it's a bit ugly and I suspect highly wxWidgets version dependent,
but it has been working reliably so far. I am using wxWidgets 2.9.4
so your mileage may vary.
I found you had to set the wxTE_PROCESS_ENTER style flag for the
wxComboBox in order for the wxEVT_COMMAND_TEXT_ENTER to be
generated.
However I also found that a wxEVT_COMMAND_TEXT_ENTER was generated
when a new value was selected in the wxComboBox using the drop down,
which was immediately followed by the
wxEVT_COMMAND_COMBOBOX_SELECTED.
So what I ended up doing was enabling wxTE_PROCESS_ENTER in the OSX
Cocoa build, and binding functions to both
wxEVT_COMMAND_COMBOBOX_SELECTED and wxEVT_COMMAND_TEXT_ENTER. Then
when I get a wxEVT_COMMAND_TEXT_ENTER message from the wxComboBox I
set a flag indicating I got an Enter key press and start a wxTimer
which times out after 1ms.
If I get wxEVT_COMMAND_COMBOBOX_SELECTED before the timer times out
I clear the flag. Once the timer times out I check the flag, and if
it is still set I send a wxEVT_COMMAND_BUTTON_CLICKED to the button
I want activated.
The code required to implement this is short and straight forward,
and possibly easier to understand than my explanation. If you want
me to post it let me know.
Hope this is of some help.
Dion