Contents Up Previous Next

wxMenuBar is-a wxWindow

A menu bar is a standard user interface element which places the main commands of an application along the top of a wxFrame.

The menu bar must be assigned to a frame using wxFrame set-menu-bar. Once this is done, the menu bar must not be deleted by the application: it will be deleted when the frame is deleted.

A menu or menu bar string may contain an ampersand, which is taken to mean 'underline the next character and use it as the hotkey'. This gives the user the opportunity to use keystrokes to access menus and items.

See also wxMenu.

wxMenuBar create
wxMenuBar append
wxMenuBar check
wxMenuBar checked
wxMenuBar enable


wxMenuBar create

void ( create)

Creates a menu bar.


wxMenuBar append

bool ( append long menu-id string title)

Appends a menu to a menu bar.


wxMenuBar check

bool ( check long item-id bool check)

Checks (check = TRUE) or unchecks (check = FALSE) the given menu item. MS Windows only.


wxMenuBar checked

bool ( checked long item-id)

Returns TRUE if the menu item is checked, FALSE otherwise.


wxMenuBar enable

bool ( enable long item-id bool enable)

Enables (enable = TRUE) or disables (enable = FALSE) the given menu item.