Windows KeyEvent

Hi all,

I am getting crazy about a Windows-KeyEvent problem:
I have various Windows and I am trying to catch "EVT_KEY_DOWN", especially " WXK_DOWN", but nothing happens!
On Linux/FreeBSD it works perfectly!
I am calling "eventSkip()" for "EVT_KEY_DOWN" in all possible Windows and Panels.
Is there a trick to catch this Key-Event?

regards,

Thorsten

···

--
brainbot technologies AG boppstrasse . 64 . 55118 mainz . germany
fon +49 6131 211639-1 . fax +49 6131 211639-2
http://brainbot.com/ mailto:henni@brainbot.com

Hi,

I had toset "wxWANTS_CHARS for all Panels in the wxSrolledWindow!

Thank you very much!

Thorsten

Robin Dunn wrote:

···

Thorsten Henninger wrote:

Do you bind the event handler to the widget that has the keyboard focus? What kind of widget is it?

The widget where I want to catch the KEY_EVENTS is a ScrolledWindow, and inside this window, there is a self-construced list wich holds a self-constructed two-line list consisting out ouf panels.
I attached a screenshot of the widgets, because it's too hard to explain otherwise.
I would like to move up and down the list with my keyboard.

How do I set the Keyboard-Focus? Is this different from SetFocus?

Okay, for a wxScrolledWindow you probably need to give it the wxWANTS_CHARS style in order to get the arrow keys, and you may also need to call SetFocus in the EVT_LEFT_DOWN handler so it will get the focus when you click on it.

--
brainbot technologies AG boppstrasse . 64 . 55118 mainz . germany
fon +49 6131 211639-1 . fax +49 6131 211639-2
http://brainbot.com/ mailto:henni@brainbot.com