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
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.

Property Summary
  Menu: See GetMenu
  MenuId: See GetMenuId
  thisown: The membership flag

Method Details

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

Constructor

Parameters:
type
           (type=EventType)

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

Property Details

Menu

See GetMenu

Get Method:
GetMenu(self)

MenuId

See GetMenuId

Get Method:
GetMenuId(self)

thisown

The membership flag


Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:14:31 2007 http://epydoc.sf.net