Gtk.MenuToolButton
const Gtk = imports.gi.Gtk;
let menu_tool_button = new Gtk.MenuToolButton({
menu: value,
});
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.
Use Gtk.new to create a new Gtk.MenuToolButton. Use Gtk.new_from_stock to create a new Gtk.MenuToolButton containing a stock item.
<refsect2 id="GtkMenuToolButton-BUILDER-UI"> <title>GtkMenuToolButton as GtkBuildable</title> <para> The GtkMenuToolButton implementation of the GtkBuildable interface supports adding a menu by specifying "menu" as the "type" attribute of a <child> element.
<example> <title>A UI definition fragment with menus</title> <programlisting><![CDATA[ <object class="GtkMenuToolButton"> <child type="menu"> <object class="GtkMenu"/> </child> </object> ]]></programlisting> </example> </para> </refsect2>
Hierarchy
-
GObject.Object
-
GObject.InitiallyUnowned
-
Gtk.Widget
-
Gtk.Container
-
Gtk.Bin
-
Gtk.ToolItem
-
Gtk.ToolButton
- Gtk.MenuToolButton
-
-
-
-
-
-