Page 1 of 1
how to get RETURN in a derived wxOwnerDrawnComboBox with GTK
Posted: Tue May 05, 2009 9:10 am
I derived an object from wxOwnerDrawnComboBox. It's a combo that can be edited. But I cannot get the EVT_TEXT_ENTER event when RETURN is pressed.
The DOC says that the wxTE_PROCESS_ENTER is valifd only for WINDOWS.
Any suggetion to solve this problem?
Posted: Wed May 06, 2009 12:30 am
I don't have any clean solution, but you could simply try interrupting key events : http://wiki.wxwidgets.org/Catching_key_events_globally
Though which manual page are you referring too? I can't find this mention
Posted: Wed May 06, 2009 8:53 am
Thanks for the reply. Now I'll try the suggested solution.
The on line documentation says
The control will generate the event wxEVT_COMMAND_TEXT_ENTER (otherwise pressing Enter key is either processed internally by the control or used for navigation between dialog controls). Windows only.
and no event is generated when ENTER is pressed. I'm working on Linux with wxGTK.
Posted: Thu May 07, 2009 1:21 am
Which wx version is this, and which docs page? I can't see this line : http://docs.wxwidgets.org/stable/wx_wxtextctrl.html
Posted: Thu May 07, 2009 6:01 am
Normally I use the online doc http://docs.wxwidgets.org/trunk/classes.html
that is more detailed, also if I'm working with the 2.8 version.
In the wxComboCtrl windows styles description I found that it's windows only. In the farmer documentation no mention about, but it doesn't work (or I made some mistake).
Now, using the EVT_KEY_DOWN event and filtering the ENTER char, I solved my needs, but I hoped for a more simple solution.
Posted: Thu May 07, 2009 11:55 pm
giovesas wrote:In the farmer documentation no mention about, but it doesn't work (or I made some mistake).
Farmer documentation? cool
This might indeed be a case for bug report / feature request if it's not already in the tracker. good luck