Package wx :: Class MenuEvent
[frames | no frames]

Type MenuEvent

object --+        
         |        
    Object --+    
             |    
         Event --+
                 |
                MenuEvent


This class is used for a variety of menu-related events. Note that these do not include menu command events, which are handled by sending wx.CommandEvent objects.

The default handler for wx.EVT_MENU_HIGHLIGHT displays menu item help text in the first field of the status bar.

Events

wx.EVT_MENU_OPEN 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 A menu has been just closed.
wx.EVT_MENU_HIGHLIGHT Sent when the menu item with the specified id has been highlighted: used by default to show help prompts in the wx.Frame's status bar.
wx.EVT_MENU_HIGHLIGHT_ALL Can be used to catch the menu highlight event for all menu items.

Method Summary
MenuEvent __init__(self, type, winid, menu)
Constructor
  __repr__(self)
Menu GetMenu(self)
Returns the menu which is being opened or closed.
int GetMenuId(self)
Returns the menu identifier associated with the event.
bool IsPopup(self)
Returns True if the menu which is being opened or closed is a popup menu, False if it is a normal one.

Method Details

__init__(self, type=wxEVT_NULL, winid=0, menu=None)
(Constructor)

Constructor

Parameters:
type
           (type=wxEventType)

winid
           (type=int)

menu
           (type=Menu)

Returns:
MenuEvent
Overrides:
wx.Event.__init__

GetMenu(self)

Returns the menu which is being opened or closed. This method should only be used with the OPEN and CLOSE events.

Returns:
Menu

GetMenuId(self)

Returns the menu identifier associated with the event. This method should be only used with the HIGHLIGHT events.

Returns:
int

IsPopup(self)

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

Generated by Epydoc 2.1.20050511.rpd on Sun Mar 26 10:02:35 2006 http://epydoc.sf.net