[wxPython] MenuBar events

This might be a dumb question: Can you make an event handler for a wxMenuBar event? When you click on a menu bar item (e.g.), I need to do some checks, then enable or disable on of the items in that menu.

Cheers,
James

···

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com

This might be a dumb question: Can you make an event handler for a

wxMenuBar

event? When you click on a menu bar item (e.g.), I need to do some

checks,

then enable or disable on of the items in that menu.

You can do what you want using the EVT_UPDATE_UI event. The handler will be
called before the menu is shown and you can do your checks there and
enable/disable the menu items as needed. There is a example of using it in
the doodle sample.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!