gtk.MenuToolButton — A gtk.ToolItem
containing a button with an additional dropdown menu (new in PyGTK
2.6)
class gtk.MenuToolButton(gtk.ToolButton): |
+--gobject.GObject +-- gtk.Object +-- gtk.Widget +-- gtk.Container +-- gtk.Bin +-- gtk.ToolItem +-- gtk.ToolButton +-- gtk.MenuToolButton
gtk.Container Signal Prototypes
gtk.ToolItem Signal Prototypes
gtk.ToolButton Signal Prototypes
def callback( |
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.
gtk.MenuToolButton(stock_id
)
| |
Returns : | a new gtk.MenuToolButton |
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(icon_widget
, label
)
| a widget that will be used as icon widget,
or None |
| a string that will be used as label, or
None |
Returns : | a new gtk.MenuToolButton |
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
.
def set_menu(menu
)
| a gtk.Menu |
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
.
def get_menu()
Returns : | the associated gtk.Menu |
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
.
def set_arrow_tooltip(tooltips
, tip_text
, tip_private
=None)
| A gtk.Tooltips
object. |
| The text to use as the tooltip or
None |
| Opitonal private tooltip text or
None . Defaults to
None . |
This method is deprecated in PyGTK 2.12 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
.
def set_arrow_tooltip_markup(markup
)
| Markup text to be used as tooltip text for button's arrow button. |
This method is available in PyGTK 2.12 and above.
The set_arrow_tooltip_markup
() method sets the tooltip
markup to be used as tooltip for the arrow button which pops up the menu. See
gtk.ToolItem.set_tooltip
()
for setting a tooltip on the whole
gtk.MenuToolButton
.
def set_arrow_tooltip_text(text
)
| Text to be used as tooltip text for button's arrow button. |
This method is available in PyGTK 2.12 and above.
The set_arrow_tooltip_markup
() method sets the tooltip
text to be used as tooltip for the arrow button which pops up the menu. See
gtk.ToolItem.set_tooltip
()
for setting a tooltip on the whole
gtk.MenuToolButton
.
def callback(menutoolbutton
, user_param1
, ...
)
| the menutoolbutton that received the signal |
| the first user parameter (if any) specified
with the connect () |
| additional user parameters (if any) |
This signal is available in GTK+ 2.6 and above.
The "show-menu" signal is emitted before the dropdown menu is displayed.