wxPython: Intercepting keyboard events from multiple widgets?

Donnal Walter donnal at donnal.net
Fri Apr 18 05:26:35 EDT 2003


Greg Ewing (using news.cis.dfn.de) wrote:
> I have another problem now. I've set up an Edit
> menu with wxID_CUT etc. in the appropriate places.
> According to the docs wxTextCtrl is supposed to
> come with default event bindings for these, but
> they don't seem to do anything.
> 
> And if I try to
> use EVT_MENU to explicitly attach a handler for
> one of them to a wxTextCtrl, it never gets called,
> although if I do that for the parent window of the
> wxTextCtrl (which is a wxNotebook) it does get called.
> It's as though the menu event is not being delivered to the
> control itself, but to its parent.
> 
> Is there anything special I have to do to get menu
> events delivered to text controls?

I don't know the answer to this specific question, but if one is not 
forthcoming in this forum, you might try asking it on 
germane.comp.python.wxpython or the mailing list at:
wxPython-users at lists.wxwindows.org

In the meantime, try right-clicking on the wxTextCtrl and see if that 
gives you the functionality you are looking for. (I know you want the 
frame menubar to do this, but this might help for now.)

Cheers,
Donnal Walter
Arkansas Children's Hospital
http://mindwrapper.org








More information about the Python-list mailing list