Object Hierarchy:

Object hierarchy for DropDown


[ CCode ( type_id = "gtk_drop_down_get_type ()" ) ]
public class DropDown : Widget, Accessible, Buildable, ConstraintTarget

GtkDropDown is a widget that allows the user to choose an item from a list of options.

The GtkDropDown displays the selected choice.

The options are given to GtkDropDown in the form of ListModel, and how the individual options are represented is determined by a ListItemFactory. The default factory displays simple strings.

GtkDropDown knows how to obtain strings from the items in a StringList; for other models, you have to provide an expression to find the strings via 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 set_enable_search.

CSS nodes

GtkDropDown has a single CSS node with name dropdown, with the button and popover nodes as children.


GtkDropDown uses the COMBO_BOX role.

Namespace: Gtk
Package: gtk4



Creation methods:


Inherited Members:

All known members inherited from class Gtk.Widget