Package: gtk

Class gtk:menu-tool-button

Superclasses

Documented Subclasses

None

Direct Slots

menu
The menu property of type gtk:menu (Read / Write)
The dropdown menu.

Details

The gtk:menu-tool-button widget is a gtk:tool-item that contains a button and a small additional button with an arrow. When clicked, the arrow button pops up a dropdown menu.

Use the gtk:menu-tool-button-new function to create a new menu tool button and the gtk:menu-tool-button-new-from-stock function to create a new menu tool button containing a stock item.

GtkMenuToolButton as GtkBuildable

The gtk:menu-tool-button implementation of the gtk:buildable interface supports adding a menu by specifying "menu" as the type attribute of a <child> element.

Example: A UI definition fragment with menus:
<object class="GtkMenuToolButton">
  <child type="menu">
    <object class="GtkMenu"/>
  </child>
</object>    

Signal Details

The "show-menu" signal
lambda (button)    :run-first      
button
The gtk:menu-tool-button widget on which the signal is emitted.
The signal is emitted before the menu is shown. It can be used to populate the menu on demand, using the gtk:menu-tool-button-menu function. Note that even if you populate the menu dynamically in this way, you must set an empty menu on the menu tool button beforehand, since the arrow is made insensitive if the menu is not set.
 

Returned by

Slot Access Functions

Inherited Slot Access Functions

See also

2026-05-30