how to get RETURN in a derived wxOwnerDrawnComboBox with GTK

Are you writing your own components and need help with how to set them up or have questions about the components you are deriving from ? Ask them here.
Post Reply
giovesas
Earned a small fee
Earned a small fee
Posts: 10
Joined: Mon Sep 29, 2008 6:58 am
Location: Pecetto torinese

how to get RETURN in a derived wxOwnerDrawnComboBox with GTK

Post by giovesas »

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?
gianni
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria »

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
giovesas
Earned a small fee
Earned a small fee
Posts: 10
Joined: Mon Sep 29, 2008 6:58 am
Location: Pecetto torinese

Post by giovesas »

Thanks for the reply. Now I'll try the suggested solution.
The on line documentation says
# wxTE_PROCESS_ENTER:
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.
gianni
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria »

Which wx version is this, and which docs page? I can't see this line : http://docs.wxwidgets.org/stable/wx_wxtextctrl.html
giovesas
Earned a small fee
Earned a small fee
Posts: 10
Joined: Mon Sep 29, 2008 6:58 am
Location: Pecetto torinese

Post by giovesas »

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.
gianni
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria »

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
Post Reply