adw.combo_row
Module for [ComboRow] class
Types 3
A gtk.list_box_row.ListBoxRow used to choose from a list of items.
The adw.combo_row.ComboRow widget allows the user to choose from a list of valid choices. The row displays the selected choice. When activated, the row displays a popover which allows the user to make a new choice.
Example of an adw.combo_row.ComboRow UI definition:
<object class="AdwComboRow">
<property name="title" translatable="yes">Combo Row</property>
<property name="model">
<object class="GtkStringList">
<items>
<item translatable="yes">Foo</item>
<item translatable="yes">Bar</item>
<item translatable="yes">Baz</item>
</items>
</object>
</property>
</object>The adw.combo_row.ComboRow.selected and adw.combo_row.ComboRow.selectedItem properties can be used to keep track of the selected item and react to their changes.
adw.combo_row.ComboRow mirrors gtk.drop_down.DropDown, see that widget for details.
adw.combo_row.ComboRow is gtk.list_box_row.ListBoxRow.activatable if a model is set.
CSS nodes
adw.combo_row.ComboRow has a main CSS node with name row and the .combo style class.
Its popover has the node named popover with the .menu style class, it contains a gtk.scrolled_window.ScrolledWindow, which in turn contains a gtk.list_view.ListView, both are accessible via their regular nodes.
Accessibility
adw.combo_row.ComboRow uses the gtk.types.AccessibleRole.ComboBox role.
ComboRowGidBuilder builder() static nothrowGet builder for [adw.combo_row.ComboRow] Returns: New builder objectbool enableSearch() @property nothrowGet `enableSearch` property. Returns: Whether to show a search entry in the popup.void enableSearch(bool propval) @property nothrowSet `enableSearch` property. Params: propval = Whether to show a search entry in the popup.gtk.expression.Expression expression() @property nothrowGet `expression` property. Returns: An expression used to obtain strings from items.void expression(gtk.expression.Expression propval) @property nothrowSet `expression` property. Params: propval = An expression used to obtain strings from items.gtk.list_item_factory.ListItemFactory factory() @property nothrowGet `factory` property. Returns: Factory for populating list items.void factory(gtk.list_item_factory.ListItemFactory propval) @property nothrowSet `factory` property. Params: propval = Factory for populating list items.gtk.list_item_factory.ListItemFactory listFactory() @property nothrowGet `listFactory` property. Returns: The factory for populating list items in the popup.void listFactory(gtk.list_item_factory.ListItemFactory propval) @property nothrowSet `listFactory` property. Params: propval = The factory for populating list items in the popup.gio.list_model.ListModel model() @property nothrowGet `model` property. Returns: The model that provides the displayed items.void model(gio.list_model.ListModel propval) @property nothrowSet `model` property. Params: propval = The model that provides the displayed items.uint selected() @property nothrowGet `selected` property. Returns: The position of the selected item.void selected(uint propval) @property nothrowSet `selected` property. Params: propval = The position of the selected item.gobject.object.ObjectWrap selectedItem() @property nothrowGet `selectedItem` property. Returns: The selected item.bool useSubtitle() @property nothrowGet `useSubtitle` property. Returns: Whether to use the current value as the subtitle.void useSubtitle(bool propval) @property nothrowSet `useSubtitle` property. Params: propval = Whether to use the current value as the subtitle.gtk.expression.Expression getExpression() nothrowGets the expression used to obtain strings from items. Returns: the expression used to obtain strings from itemsgtk.list_item_factory.ListItemFactory getFactory() nothrowGets the factory for populating list items. Returns: the factory in usegtk.list_item_factory.ListItemFactory getListFactory() nothrowGets the factory for populating list items in the popup. Returns: the factory in usegio.list_model.ListModel getModel() nothrowGets the model that provides the displayed items. Returns: The model in useuint getSelected() nothrowGets the position of the selected item. Returns: the position of the selected item, or [gtk.types.INVALID_LIST_POSITION] if no item is selectedgobject.object.ObjectWrap getSelectedItem() nothrowGets the selected item. Returns: the selected itembool getUseSubtitle() nothrowGets whether to use the current value as the subtitle. Returns: whether to use the current value as the subtitlevoid setExpression(gtk.expression.Expression expression = null) nothrowSets the expression used to obtain strings from items.void setFactory(gtk.list_item_factory.ListItemFactory factory = null) nothrowSets the factory for populating list items.void setListFactory(gtk.list_item_factory.ListItemFactory factory = null) nothrowSets the factory for populating list items in the popup.void setModel(gio.list_model.ListModel model = null) nothrowSets the model that provides the displayed items.Fluent builder implementation template for adw.combo_row.ComboRow
T enableSearch(bool propval) nothrowSet `enableSearch` property. Params: propval = Whether to show a search entry in the popup.T expression(gtk.expression.Expression propval) nothrowSet `expression` property. Params: propval = An expression used to obtain strings from items.T factory(gtk.list_item_factory.ListItemFactory propval) nothrowSet `factory` property. Params: propval = Factory for populating list items.T listFactory(gtk.list_item_factory.ListItemFactory propval) nothrowSet `listFactory` property. Params: propval = The factory for populating list items in the popup.T model(gio.list_model.ListModel propval) nothrowSet `model` property. Params: propval = The model that provides the displayed items. Returns: Builder instance for fluent chainingT selected(uint propval) nothrowSet `selected` property. Params: propval = The position of the selected item.T useSubtitle(bool propval) nothrowSet `useSubtitle` property. Params: propval = Whether to use the current value as the subtitle.Fluent builder for adw.combo_row.ComboRow