gtk.MenuToolButton

gtk.MenuToolButton — A gtk.ToolItem containing a button with an additional dropdown menu (new in PyGTK 2.6)

Synopsis

class gtk.MenuToolButton(gtk.ToolButton):
    gtk.MenuToolButton(stock_id)
gtk.MenuToolButton(icon_widget, label)
def set_menu(menu)
def get_menu()
def set_arrow_tooltip(tooltips, tip_text, tip_private=None)

Ancestry

+-- gobject.GObject
  +-- gtk.Object
    +-- gtk.Widget
      +-- gtk.Container
        +-- gtk.Bin
          +-- gtk.ToolItem
            +-- gtk.ToolButton
              +-- gtk.MenuToolButton

Properties

"menu"Read-WriteThe dropdown gtk.Menu.

Signal Prototypes

"show-menu" def callback(menutoolbutton, user_param1, ...)

Description

Note

This widget is available in PyGTK 2.6 and above.

A gtk.MenuToolButton is a gtk.ToolItem that contains a button and a small additional button with an arrow. When clicked, the arrow button pops up a dropdown menu.

Constructor

gtk.MenuToolButton

    gtk.MenuToolButton(stock_id)
stock_id :
Returns :a new gtk.MenuToolButton

Note

This constructor is available in PyGTK 2.6 and above.

Creates a new gtk.MenuToolButton using from the stock item specified by stock_id. The new gtk.MenuToolButton will contain the icon and label associated with stock_id.

gtk.MenuToolButton

    gtk.MenuToolButton(icon_widget, label)
icon_widget :a widget that will be used as icon widget, or None
label :a string that will be used as label, or None
Returns :a new gtk.MenuToolButton

Note

This constructor is available in PyGTK 2.6 and above.

Creates a new gtk.MenuToolButton using the icon specified by icon_widget and the label specified by label.

Methods

gtk.MenuToolButton.set_menu

    def set_menu(menu)
menu :a gtk.Menu

Note

This method is available in PyGTK 2.6 and above.

The set_menu() method sets the "menu" property to the gtk.Menu specified by menu.

gtk.MenuToolButton.get_menu

    def get_menu()
Returns :the associated gtk.Menu

Note

This method is available in PyGTK 2.6 and above.

The get_menu() method returns the value of the "menu" property that contains the associated gtk.Menu.

gtk.MenuToolButton.set_arrow_tooltip

    def set_arrow_tooltip(tooltips, tip_text, tip_private=None)
tooltips :A gtk.Tooltips object.
tip_text :The text to use as the tooltip or None
tip_private :Opitonal private tooltip text or None. Defaults to None.

Note

This method is available in PyGTK 2.6 and above.

The set_arrow_tooltip() method sets the tooltip data specified by tip_text for the arrow button using the gtk.Tooltips object specified by tooltips.

Signals

The "show-menu" gtk.MenuToolButton Signal

    def callback(menutoolbutton, user_param1, ...)
menutoolbutton :the menutoolbutton that received the signal
user_param1 :the first user parameter (if any) specified with the connect() method
... :additional user parameters (if any)

Note

This signal is available in GTK+ 2.6 and above.

The "show-menu" signal is emitted before the dropdown menu is displayed.