Grant Bowman wrote:
Hi All,
I'm building a strange application. I have loaded some menus and menu
items from an XRC file. What is the best way to catch and handle a
wxCommandEvent for an undefined menu command? If necessary I will want
to check to ensure that it is undefined first. After I catch it I will
use a dialog to assign it for use later.I've read the "Event handling overview" that comes with the wxwin.htm
documentation of wx2.5.1, especially the "How events are processed"
section.Do I need to catch it during ProcessEvent at the wxApp level or should I
just assign methods to them manually isntead?
IIRC, you can bind EVT_MENU to the app object, using an ID of -1, then all menu events that are not handled by the frame will be sent to the app. Be careful though, if the handler calls event.Skip() then it will still go to the app.
ยทยทยท
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!