Class
AdwComboRow
Description [src]
class Adw.ComboRow : Adw.ActionRow {
parent_instance: AdwActionRow
}
A GtkListBoxRow
used to choose from a list of items.
The AdwComboRow
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 AdwComboRow
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 AdwComboRow:selected
and AdwComboRow:selected-item
properties can be used to keep track of the selected item and react to their changes.
AdwComboRow
mirrors GtkDropDown
, see that widget for details.
AdwComboRow
is GtkListBoxRow:activatable
if a model is set.
CSS nodes
AdwComboRow
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 GtkScrolledWindow
, which in turn contains a
GtkListView
, both are accessible via their regular nodes.
Accessibility
AdwComboRow
uses the GTK_ACCESSIBLE_ROLE_COMBO_BOX
role.
Available since: | 1.0 |
Ancestors
- AdwActionRow
- AdwPreferencesRow
- GtkListBoxRow
- GtkWidget
- GInitiallyUnowned
- GObject
Instance methods
adw_combo_row_get_expression
Gets the expression used to obtain strings from items.
Available since: 1.0
adw_combo_row_get_list_factory
Gets the factory for populating list items in the popup.
Available since: 1.0
adw_combo_row_get_use_subtitle
Gets whether to use the current value as the subtitle.
Available since: 1.0
adw_combo_row_set_expression
Sets the expression used to obtain strings from items.
Available since: 1.0
adw_combo_row_set_list_factory
Sets the factory for populating list items in the popup.
Available since: 1.0
adw_combo_row_set_use_subtitle
Sets whether to use the current value as the subtitle.
Available since: 1.0
Methods inherited from AdwActionRow (14)
adw_action_row_activate
Activates self
.
Available since: 1.0
adw_action_row_add_prefix
Adds a prefix widget to self
.
Available since: 1.0
adw_action_row_add_suffix
Adds a suffix widget to self
.
Available since: 1.0
adw_action_row_get_activatable_widget
Gets the widget activated when self
is activated.
Available since: 1.0
adw_action_row_get_icon_name
Gets the icon name for self
.
Available since: 1.0
adw_action_row_get_subtitle
Gets the subtitle for self
.
Available since: 1.0
adw_action_row_get_subtitle_lines
Gets the number of lines at the end of which the subtitle label will be ellipsized.
Available since: 1.0
adw_action_row_get_title_lines
Gets the number of lines at the end of which the title label will be ellipsized.
Available since: 1.0
adw_action_row_remove
Removes a child from self
.
Available since: 1.0
adw_action_row_set_activatable_widget
Sets the widget to activate when self
is activated.
Available since: 1.0
adw_action_row_set_icon_name
Sets the icon name for self
.
Available since: 1.0
adw_action_row_set_subtitle
Sets the subtitle for self
.
Available since: 1.0
adw_action_row_set_subtitle_lines
Sets the number of lines at the end of which the subtitle label will be ellipsized.
Available since: 1.0
adw_action_row_set_title_lines
Sets the number of lines at the end of which the title label will be ellipsized.
Available since: 1.0
Methods inherited from AdwPreferencesRow (8)
adw_preferences_row_get_title
Gets the title of the preference represented by self
.
Available since: 1.0
adw_preferences_row_get_title_selectable
Gets whether the user can copy the title from the label.
Available since: 1.1
adw_preferences_row_get_use_markup
Gets whether to use Pango markup for the title label.
Available since: 1.2
adw_preferences_row_get_use_underline
Gets whether an embedded underline in the title indicates a mnemonic.
Available since: 1.0
adw_preferences_row_set_title
Sets the title of the preference represented by self
.
Available since: 1.0
adw_preferences_row_set_title_selectable
Sets whether the user can copy the title from the label.
Available since: 1.1
adw_preferences_row_set_use_markup
Sets whether to use Pango markup for the title label.
Available since: 1.2
adw_preferences_row_set_use_underline
Sets whether an embedded underline in the title indicates a mnemonic.
Available since: 1.0
Properties
Properties inherited from AdwActionRow (5)
Adw.ActionRow:activatable-widget
The widget to activate when the row is activated.
Available since: 1.0
Adw.ActionRow:icon-name
The icon name for this row.
Available since: 1.0
Adw.ActionRow:subtitle
The subtitle for this row.
Available since: 1.0
Adw.ActionRow:subtitle-lines
The number of lines at the end of which the subtitle label will be ellipsized.
Available since: 1.0
Adw.ActionRow:title-lines
The number of lines at the end of which the title label will be ellipsized.
Available since: 1.0
Properties inherited from AdwPreferencesRow (4)
Adw.PreferencesRow:title
The title of the preference represented by this row.
Available since: 1.0
Adw.PreferencesRow:title-selectable
Whether the user can copy the title from the label.
Available since: 1.1
Adw.PreferencesRow:use-markup
Whether to use Pango markup for the title label.
Available since: 1.2
Adw.PreferencesRow:use-underline
Whether an embedded underline in the title indicates a mnemonic.
Available since: 1.0