file: dropdown.aus

class: DropDownMeta

[681:14] static extends: object

Generated metadata helpers for DropDown class surfaces.

Methods

class: DropDownActivateCallback

[611:7] extends: object

Generated low-level callback wrapper for GIR callback activate.

Members

Methods

class: DropDown

[40:7] extends: object

Allows the user to choose an item from a list of options. An example GtkDropDown The GtkDropDown displays the [selected][property@Gtk.DropDown:selected] choice. The options are given to GtkDropDown in the form of GListModel and how the individual options are represented is determined by a [class@Gtk.ListItemFactory]. The default factory displays simple strings, and adds a checkmark to the selected item in the popup. To set your own factory, use [method@Gtk.DropDown.set_factory]. It is possible to use a separate factory for the items in the popup, with [method@Gtk.DropDown.set_list_factory]. GtkDropDown knows how to obtain strings from the items in a [class@Gtk.StringList]; for other models, you have to provide an expression to find the strings via [method@Gtk.DropDown.set_expression]. GtkDropDown can optionally allow search in the popup, which is useful if the list of options is long. To enable the search entry, use [method@Gtk.DropDown.set_enable_search]. Here is a UI definition example for GtkDropDown with a simple model: xml <object class="GtkDropDown"> <property name="model"> <object class="GtkStringList"> <items> <item translatable="yes">Factory</item> <item translatable="yes">Home</item> <item translatable="yes">Subway</item> </items> </object> </property> </object> If a GtkDropDown is created in this manner, or with [ctor@Gtk.DropDown.new_from_strings], for instance, the object returned from [method@Gtk.DropDown.get_selected_item] will be a [class@Gtk.StringObject]. To learn more about the list widget framework, see the overview. ## CSS nodes GtkDropDown has a single CSS node with name dropdown, with the button and popover nodes as children. ## Accessibility GtkDropDown uses the [enum@Gtk.AccessibleRole.combo_box] role.

Members

Methods

class: DropDownCtors

[592:14] static extends: object

Alternate constructors for DropDown. Usage: DropDownCtors.<name>(...). The primary constructor lives directly on DropDown.

Methods