[Mac, 2.8.2] Handling menu open event

Vadim Zeitlin vadim at wxwidgets.org
Tue Jul 17 10:40:09 PDT 2007


On Tue, 17 Jul 2007 15:52:47 +0200 Yaron Tadmor <YaronT at HumanEyes.com> wrote:

YT> Yes, but the code that wants to hook to the menu, doesn't have direct
YT> access to the frame.

 Sorry, I don't understand. If you have a wxMenu, you have wxMenuBar (via
its GetMenuBar() method). If you have wxMenuBar, you have its wxFrame (via
its GetFrame() method).

YT> So the question is this: Should I change my code so I have access to the
YT> frame, or can I just access one of the menus in the menubar and get the
YT> frame from it?

 Of course you can, why not?
VZ

-- 
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/





More information about the wx-users mailing list