sending all key events to wx.panel?

Steve Holden steve at
Fri Nov 25 10:00:33 CET 2005

KvS wrote:
> 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?
> Thanks in advance!
> - Kees
Why not just attach the event handler to the wxWindow containing the 
panel? If the panel ignores keyboard events they'll just rise to the 
containing window, won't they?

Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC           
PyCon TX 2006        

More information about the Python-list mailing list