gtk.MenuBar
Prev | The gtk Class Reference | Next

## gtk.MenuBar

gtk.MenuBar — a widget that displays `gtk.MenuItem` widgets horizontally

## Synopsis

    class gtk.MenuBar(gtk.MenuShell):
        gtk.MenuBar()
        def set_pack_direction(pack_dir)
        def get_pack_direction()
        def set_child_pack_direction(child_pack_dir)
        def get_child_pack_direction()

## Ancestry

    +-- gobject.GObject
      +-- gtk.Object
        +-- gtk.Widget
          +-- gtk.Container
            +-- gtk.MenuShell
              +-- gtk.MenuBar

## gtk.MenuBar Properties

gtk.Object Properties

gtk.Widget Properties

gtk.Container Properties

gtk.MenuShell Properties

"child-pack-direction" | Read-Write | The pack direction of the menubar. It determines how the widgets contained in child menuitems are arranged. Default value: `gtk.PACK_DIRECTION_LTR`. Available in GTK+ 2.8 and above.
"pack-direction" | Read-Write | The pack direction of the menubar. It determines how menuitems are arranged in the menubar. Default value: `gtk.PACK_DIRECTION_LTR`. Available in GTK+ 2.8 and above.

## gtk.MenuBar Style Properties

gtk.Widget Style Properties

"internal-padding" | Read | Amount of border space between the menubar shadow and the menu items
"shadow-type" | Read | The style of bevel around the menubar

## gtk.MenuBar Signal Prototypes

gobject.GObject Signal Prototypes

gtk.Object Signal Prototypes

gtk.Widget Signal Prototypes

gtk.Container Signal Prototypes

gtk.MenuShell Signal Prototypes

## Description

The `gtk.MenuBar` is a subclass of `gtk.MenuShell` which contains one or more `gtk.MenuItem` widgets. A `gtk.MenuBar` displays the menu items horizontally in an application window or dialog.

## Constructor

        gtk.MenuBar()

Returns : | a new `gtk.MenuBar` widget

Creates a new `gtk.MenuBar` widget.

## Methods

### gtk.MenuBar.set_pack_direction

        def set_pack_direction(pack_dir)

`pack_dir` : | one of the GTK Pack Direction Constants.

### Note

This method is available in PyGTK 2.8 and above.

The `set_pack_direction`() sets the "pack-direction" property to the value of `pack_dir`. `pack_dir` must be one of the GTK Pack Direction Constants that specify how menuitems are arranged in the menubar.

### gtk.MenuBar.get_pack_direction

        def get_pack_direction()

Returns : | the current pack direction of the menubar.

### Note

This method is available in PyGTK 2.8 and above.

The `get_pack_direction`() method returns the value of the "pack-direction" property that specifies the arrangement of menuitems in the menubar. See the GTK Pack Direction Constants for more information.

### gtk.MenuBar.set_child_pack_direction

        def set_child_pack_direction(child_pack_dir)

`child_pack_dir` : | one of the GTK Pack Direction Constants.

### Note

This method is available in PyGTK 2.8 and above.

The `set_child_pack_direction`() method sets the "child-pack-direction" property to the value of `child_pack_dir`. `child_pack_dir` must be one of the GTK Pack Direction Constants that specify how menuitems are arranged in the child menuitems of the menubar.

### gtk.MenuBar.get_child_pack_direction

        def get_child_pack_direction()

Returns : | the current child pack direction

### Note

This method is available in PyGTK 2.8 and above.

The `get_child_pack_direction`() method returns the value of the "child-pack-direction" property that specifies the arrangement of menuitems in thechild menuitems of the menubar. See the GTK Pack Direction Constants for more information.

Prev | Up | Next
gtk.Menu | Home | gtk.MenuItem