Inheritance diagram for wx.MenuBar:
A menu bar is a series of menus accessible from the top of a frame.
See also
To respond to a menu selection, provide a handler for wx.EVT_MENU, in the frame that contains the menu bar. If you have a toolbar which uses the same identifiers as your wx.EVT_MENU entries, events from the toolbar will also be processed by your wx.EVT_MENU event handlers.
Tip
under Windows, if you discover that menu shortcuts (for example, Alt-F to show the file menu) are not working, check any wx.EVT_CHAR events you are handling in child windows. If you are not calling event.Skip() for events that you don’t process in these event handlers, menu shortcuts may cease to work.
Default constructor.
Parameters:
Returns:
Adds the item to the end of the menu bar.
Returns True if succesful, False if some error occurred.
Parameters:
Returns:
bool
See also
Checks or unchecks a menu item.
Parameters:
Note
Only use this when the menu bar has been associated with a frame; otherwise, use the wx.Menu equivalent call.
Enables or disables a whole menu.
Parameters:
Note
Only use this when the menu bar has been associated with a frame; otherwise, use the wx.Menu equivalent call.
Enables or disables a whole menu.
Parameters:
Note
Only use this when the menu bar has been associated with a frame.
Finds the menu item object associated with the given menu item identifier.
Parameters:
Returns:
Returns the index of the menu with the given title or wx.NOT_FOUND if no such menu exists in this menubar.
The title parameter may specify either the menu title (with accelerator characters, i.e. "&File") or just the menu label ("File") indifferently.
Parameters:
Returns:
int
Finds the menu item id for a menu name/menu item string pair.
Parameters:
Returns:
int
Note
Any special menu codes are stripped out of source and target strings before matching.
Gets the help string associated with the menu item identifier.
Parameters:
Returns:
string
See also
Returns the label of a top-level menu. Note that the returned string does not include the accelerator characters which could have been specified in the menu title string during its construction.
Parameters:
Returns:
string
Note
Use only after the menubar has been associated with a frame.
Warning
This function is deprecated in favour of GetMenuLabel and GetMenuLabelText.
See also
Returns the menu at pos (zero-based).
Parameters:
Returns:
Returns the number of menus in this menubar.
Returns:
int
Returns the label of a top-level menu. Note that the returned string includes the accelerator characters that have been specified in the menu title string during its construction.
Parameters:
Returns:
string
Note
Use only after the menubar has been associated with a frame.
See also
Returns the label of a top-level menu. Note that the returned string does not include any accelerator characters that may have been specified in the menu title string during its construction.
Parameters:
Returns:
string
Note
Use only after the menubar has been associated with a frame.
See also
Return a list of (menu, label) items for the menus in the wx.MenuBar.
Returns:
list of tuples
Inserts the menu at the given position into the menu bar. Inserting menu at position 0 will insert it in the very beginning of it, inserting at position GetMenuCount is the same as calling Append.
Parameters:
Returns:
bool
See also
Determines whether an item is checked.
Parameters:
Returns:
bool
Parameters:
Returns:
bool
Parameters:
Removes the menu from the menu bar and returns the menu object - the caller is responsible for deleting it. This function may be used together with Insert to change the menubar dynamically.
Parameters:
Returns:
See also
Replaces the menu at the given position with another one.
Parameters:
Returns:
Parameters:
Sets the help string associated with a menu item.
Parameters:
See also
Sets the label of a top-level menu.
Parameters:
Note
Use only after the menubar has been associated with a frame.
Warning
This function has been deprecated in favour of SetMenuLabel.
See also
Sets the label of a top-level menu.
Parameters:
Note
Use only after the menubar has been associated with a frame.
Clear and add new menus to the wx.MenuBar from a list of (menu, label) items.
Parameters: