************ wx.MenuEvent ************ Inheritance diagram for `wx.MenuEvent`: | .. inheritance-diagram:: wx.MenuEvent | Description =========== This class is used for a variety of menu-related events. Note that these do not include menu command events, which are handled using `wx.CommandEvent `_ objects. The default handler for ``wx.EVT_MENU_HIGHLIGHT`` displays help text in the first field of the status bar. Derived From ^^^^^^^^^^^^^ * `wx.Event `_ * `wx.Object <../Widgets/wx.Object.html>`_ Event Handling ^^^^^^^^^^^^^^ ================================================== ================================================== Event Name Description ================================================== ================================================== wx.EVT_MENU_OPEN(func) A menu is about to be opened. On Windows, this is only sent once for each navigation of the menubar (up until all menus have closed). wx.EVT_MENU_CLOSE(func) A menu has been just closed. wx.EVT_MENU_HIGHLIGHT(id, func) The menu item with the specified id has been highlighted: used to show help prompts in the status bar by `wx.Frame <../Widgets/wx.Frame.html>`_ wx.EVT_MENU_HIGHLIGHT_ALL(func) A menu item has been highlighted, i.e. the currently selected menu item has changed. ================================================== ================================================== Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `GetMenu <#GetMenu>`_ * `GetMenuId <#GetMenuId>`_ * `IsPopup <#IsPopup>`_ Properties Summary ^^^^^^^^^^^^^^^^^^ * `Menu <#Menu>`_ * `MenuId <#MenuId>`_ Class API ========= Methods ^^^^^^^ .. method:: __init__(type=wx.wxEVT_NULL, winid=0, menu=None) Constructor **Parameters:** * `type` (eventtype) * `winid` (int) * `menu` (`wx.Menu <../Widgets/wx.Menu.html>`_) | **Returns:** `wx.MenuEvent `_ -------- .. method:: GetMenu() Returns the menu which is being opened or closed. This method should only be used with the ``OPEN`` and ``CLOSE`` events and even for them the returned pointer may be ``None`` in some ports. | **Returns:** `wx.Menu <../Widgets/wx.Menu.html>`_ -------- .. method:: GetMenuId() Returns the menu identifier associated with the event. This method should be only used with the ``HIGHLIGHT`` events. | **Returns:** `int` -------- .. method:: IsPopup() Returns ``True`` if the menu which is being opened or closed is a popup menu, ``False`` if it is a normal one. This method should only be used with the ``OPEN`` and ``CLOSE`` events. | **Returns:** `bool` -------- Properties ^^^^^^^^^^ .. attribute:: Menu See `GetMenu <#GetMenu>`_ .. attribute:: MenuId See `GetMenuId <#GetMenuId>`_