Jeff Grimmett wrote:
I might have an even simpler example; at the time I didn't think it was a
bug -- just a misuderstanding on my part -- but now I'm not so sure.In my case, it's real simple -- I have a wxFrame with a wxMenuBar and an
assortment of menus. In one special case I needed to know which menu item
generated the event. I was trapping EVT_MENU. When I got it,
event.GetEventObject() returned the frame instead of the menu item, as I
expected it.Like I said, at the time I just figured I was unaware of a special
circumstance for menu and tool bars, but maybe this is the same thing?
No, it is different. In this case it is the frame that is sending the event (not the menu or menu item) and so the frame is the EventObject.
BTW, I think that this has changed in 2.5 and the wxMenu will be the EO in that version -- eventhough the frame is still sending it -- because the menu is the logical source of the event.
ยทยทยท
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!