Trying to catch the enter-key in a KEY_EVT from a wxListBox

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
frz
In need of some credit
In need of some credit
Posts: 1
Joined: Mon Jul 05, 2010 2:42 pm
Location: Jakarta
Contact:

Re: Trying to catch the enter-key in a KEY_EVT from a wxLis

Post by frz » Thu Feb 28, 2013 1:21 am

To catch Enter key, simply use EVT_LISTBOX_DCLICK.

gunterkoenigsmann
Earned a small fee
Earned a small fee
Posts: 13
Joined: Tue May 31, 2016 11:30 am

Re: Trying to catch the enter-key in a KEY_EVT from a wxListBox

Post by gunterkoenigsmann » Sat Jun 25, 2016 6:42 am

Using the current git head of wxWidgets on wxGTK wxListBox doesn't handle a press of the the enter key as keypress. Instead it seems to interpret it as a equivalent of a double-click - which kind of makes sense, actually. Will hand in a patch that documents this in the manual.

One example of a program that catches this event is here:
https://github.com/andrejv/wxmaxima/com ... a9bcd078e1

Post Reply