Package wx :: Class MenuBar

[frames | no frames]

## Type MenuBar

    object --+
             |
        Object --+
                 |
        EvtHandler --+
                     |
                Window --+
                         |
                        MenuBar

Proxy of C++ MenuBar class

Method Summary
Window | ``__init__`(self, parent, id, pos, size, style, name)` Construct and show a generic Window.
bool | `Append(self, menu, title)`
| `Attach(self, frame)`
| `Check(self, id, check)`
| `Detach(self)`
bool | ``Enable`(self, enable)` Enable or disable the window for user input.
| `EnableTop(self, pos, enable)`
MenuItem | `FindItemById(self, id)`
int | `FindMenu(self, title)`
int | `FindMenuItem(self, menu, item)`
bool | `GetAutoWindowMenu()` (Static method)
wxFrame | `GetFrame(self)`
String | `GetHelpString(self, id)`
String | ``GetLabel`(self)` Generic way of getting a label from any window, for identification purposes.
String | `GetLabelTop(self, pos)`
Menu | `GetMenu(self, pos)`
size_t | `GetMenuCount(self)`
| ``GetMenus`(self)` Return a list of (menu, label) items for the menus in the MenuBar.
bool | `Insert(self, pos, menu, title)`
bool | `IsAttached(self)`
bool | `IsChecked(self, id)`
bool | ``IsEnabled`(self)` Returns true if the window is enabled for input, false otherwise.
bool | `IsEnabledTop(self, pos)`
Menu | `Remove(self, pos)`
Menu | `Replace(self, pos, menu, title)`
| `SetAutoWindowMenu(enable)` (Static method)
| `SetHelpString(self, id, helpString)`
| ``SetLabel`(self, label)` Set the text which the window shows in its label if applicable.
| `SetLabelTop(self, pos, label)`
| ``SetMenus`(self, items)` Clear and add new menus to the MenuBar from a list of (menu, label) items.
| `UpdateMenus(self)`

Property Summary
| `Frame`: See `GetFrame`
| `MenuCount`: See `GetMenuCount`
| `Menus`: See `GetMenus` and `SetMenus`
| `thisown`: The membership flag

Instance Method Details

### __init__(self, style=0)
(Constructor)

Construct and show a generic Window.

  Parameters:
    `parent`
    (type=Window)

    `id`
    (type=int)

    `pos`
    (type=Point)

    `size`
    (type=Size)

    `style`
    (type=long)

    `name`
    (type=String)

  Returns:
    Window
  Overrides:
    `wx.Window.__init__` (inherited documentation)

### Enable(self, id, enable)

Enable or disable the window for user input. Note that when a parent window is disabled, all of its children are disabled as well and they are reenabled again when the parent is. Returns true if the window has been enabled or disabled, false if nothing was done, i.e. if the window had already been in the specified state.

  Parameters:
    `enable`
    (type=bool)

  Returns:
    bool
  Overrides:
    `wx.Window.Enable` (inherited documentation)

### GetLabel(self, id)

Generic way of getting a label from any window, for identification purposes. The interpretation of this function differs from class to class. For frames and dialogs, the value returned is the title. For buttons or static text controls, it is the button text. This function can be useful for meta-programs such as testing tools or special-needs access programs)which need to identify windows by name.

  Returns:
    String
  Overrides:
    `wx.Window.GetLabel` (inherited documentation)

### GetMenus(self)

Return a list of (menu, label) items for the menus in the MenuBar.

### IsEnabled(self, id)

Returns true if the window is enabled for input, false otherwise.

  Returns:
    bool
  Overrides:
    `wx.Window.IsEnabled` (inherited documentation)

### SetLabel(self, id, label)

Set the text which the window shows in its label if applicable.

  Parameters:
    `label`
    (type=String)

  Overrides:
    `wx.Window.SetLabel` (inherited documentation)

### SetMenus(self, items)

Clear and add new menus to the MenuBar from a list of (menu, label) items.

Property Details

### Frame

See `GetFrame`

  Get Method:
    `GetFrame`(self)

### MenuCount

See `GetMenuCount`

  Get Method:
    `GetMenuCount`(self)

### Menus

See `GetMenus` and `SetMenus`

  Get Method:
    `GetMenus`(self)
  Set Method:
    `SetMenus`(self, items)

### thisown

The membership flag

Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:11:19 2007 | http://epydoc.sf.net