I have a wxPython GUI consisting of a wxWindow -> wxPanel -> set of
widgets. I need to catch pressed keys no matter which widget has focus,
so I've attached an event handler to the panel but I can't seem to find
a way to do some kind of collective "sending through" of the key event
from all the widgets on the panel to that handler in case the panel
doesn't have focus. Is there some way to do this?
In the wxWidgets documentation I can only find this a cryptic hint (at least cryptic to me):
"In some cases, it might be desired by the programmer to get a certain
number of system events in a parent window, for example all key events
sent to, but not used by, the native controls in a dialog. In this
case, a special event handler will have to be written that will
override ProcessEvent() in order to pass all events (or any selection
of them) to the parent window."
Any hints on how to do this? (I'm a beginning programmer also...)
Using event.Skip() passes the event to a higher level. So you may have to add
this to an extra event handler and add that to the underlying panels.
Cheers,
Dick
ยทยทยท
Op vrijdag 25 november 2005 23:14, schreef Kees van Schaik:
Hi all,
I have a wxPython GUI consisting of a wxWindow -> wxPanel -> set of
widgets. I need to catch pressed keys no matter which widget has focus,
so I've attached an event handler to the panel but I can't seem to find
a way to do some kind of collective "sending through" of the key event
from all the widgets on the panel to that handler in case the panel
doesn't have focus. Is there some way to do this?
In the wxWidgets documentation I can only find this a cryptic hint (at
least cryptic to me):
"In some cases, it might be desired by the programmer to get a certain
number of system events in a parent window, for example all key events
sent to, but not used by, the native controls in a dialog. In this
case, a special event handler will have to be written that will
override ProcessEvent() in order to pass all events (or any selection
of them) to the parent window."
Any hints on how to do this? (I'm a beginning programmer also...)
Thanks in advance!
Best, Kees
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org