:right-sidebar: True ComboRow =================================================================== .. currentmodule:: gi.repository.Adw .. class:: ComboRow(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Adw.ActionRow`, :class:`~gi.repository.Adw.PreferencesRow`, :class:`~gi.repository.Gtk.ListBoxRow`, :class:`~gi.repository.Gtk.Widget`, :class:`~gi.repository.GObject.InitiallyUnowned`, :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gtk.Accessible`, :class:`~gi.repository.Gtk.Actionable`, :class:`~gi.repository.Gtk.Buildable`, :class:`~gi.repository.Gtk.ConstraintTarget` :Constructors: :: ComboRow(**properties) new() -> Gtk.Widget Constructors ------------ .. rst-class:: interim-class .. class:: ComboRow :no-index: .. classmethod:: new() -> ~gi.repository.Gtk.Widget Creates a new ``AdwComboRow``. Methods ------- .. rst-class:: interim-class .. class:: ComboRow :no-index: .. method:: get_enable_search() -> bool Gets whether search is enabled. If set to ``TRUE``, a search entry will be shown in the popup that allows to search for items in the list. Search requires :obj:`~gi.repository.Adw.ComboRow.props.expression` to be set. .. versionadded:: 1.4 .. method:: get_expression() -> ~gi.repository.Gtk.Expression | None Gets the expression used to obtain strings from items. .. method:: get_factory() -> ~gi.repository.Gtk.ListItemFactory | None Gets the factory for populating list items. .. method:: get_list_factory() -> ~gi.repository.Gtk.ListItemFactory | None Gets the factory for populating list items in the popup. .. method:: get_model() -> ~gi.repository.Gio.ListModel | None Gets the model that provides the displayed items. .. method:: get_selected() -> int Gets the position of the selected item. .. method:: get_selected_item() -> ~gi.repository.GObject.Object | None Gets the selected item. .. method:: get_use_subtitle() -> bool Gets whether to use the current value as the subtitle. .. method:: set_enable_search(enable_search: bool) -> None Sets whether to enable search. If set to ``TRUE``, a search entry will be shown in the popup that allows to search for items in the list. Search requires :obj:`~gi.repository.Adw.ComboRow.props.expression` to be set. .. versionadded:: 1.4 :param enable_search: whether to enable search .. method:: set_expression(expression: ~gi.repository.Gtk.Expression | None = None) -> None Sets the expression used to obtain strings from items. The expression must have a value type of ``G_TYPE_STRING``. It's used to bind strings to labels produced by the default factory if :obj:`~gi.repository.Adw.ComboRow.props.factory` is not set, or when :obj:`~gi.repository.Adw.ComboRow.props.use_subtitle` is set to ``TRUE``. :param expression: an expression .. method:: set_factory(factory: ~gi.repository.Gtk.ListItemFactory | None = None) -> None Sets the factory for populating list items. This factory is always used for the item in the row. It is also used for items in the popup unless :obj:`~gi.repository.Adw.ComboRow.props.list_factory` is set. :param factory: the factory to use .. method:: set_list_factory(factory: ~gi.repository.Gtk.ListItemFactory | None = None) -> None Sets the factory for populating list items in the popup. If this is not set, :obj:`~gi.repository.Adw.ComboRow.props.factory` is used. :param factory: the factory to use .. method:: set_model(model: ~gi.repository.Gio.ListModel | None = None) -> None Sets the model that provides the displayed items. :param model: the model to use .. method:: set_selected(position: int) -> None Selects the item at the given position. :param position: the position of the item to select, or :obj:`~gi.repository.Gtk.INVALID_LIST_POSITION` .. method:: set_use_subtitle(use_subtitle: bool) -> None Sets whether to use the current value as the subtitle. If you use a custom list item factory, you will need to give the row a name conversion expression with :obj:`~gi.repository.Adw.ComboRow.props.expression`. If set to ``TRUE``, you should not access :obj:`~gi.repository.Adw.ActionRow.props.subtitle`. The subtitle is interpreted as Pango markup if :obj:`~gi.repository.Adw.PreferencesRow.props.use_markup` is set to ``TRUE``. :param use_subtitle: whether to use the current value as the subtitle Properties ---------- .. rst-class:: interim-class .. class:: ComboRow :no-index: .. attribute:: props.enable_search :type: bool Whether to show a search entry in the popup. If set to ``TRUE``, a search entry will be shown in the popup that allows to search for items in the list. Search requires :obj:`~gi.repository.Adw.ComboRow.props.expression` to be set. .. versionadded:: 1.4 .. attribute:: props.expression :type: ~gi.repository.Gtk.Expression An expression used to obtain strings from items. The expression must have a value type of ``G_TYPE_STRING``. It's used to bind strings to labels produced by the default factory if :obj:`~gi.repository.Adw.ComboRow.props.factory` is not set, or when :obj:`~gi.repository.Adw.ComboRow.props.use_subtitle` is set to ``TRUE``. .. attribute:: props.factory :type: ~gi.repository.Gtk.ListItemFactory Factory for populating list items. This factory is always used for the item in the row. It is also used for items in the popup unless :obj:`~gi.repository.Adw.ComboRow.props.list_factory` is set. .. attribute:: props.list_factory :type: ~gi.repository.Gtk.ListItemFactory The factory for populating list items in the popup. If this is not set, :obj:`~gi.repository.Adw.ComboRow.props.factory` is used. .. attribute:: props.model :type: ~gi.repository.Gio.ListModel The model that provides the displayed items. .. attribute:: props.selected :type: int The position of the selected item. If no item is selected, the property has the value :obj:`~gi.repository.Gtk.INVALID_LIST_POSITION` .. attribute:: props.selected_item :type: ~gi.repository.GObject.Object The selected item. .. attribute:: props.use_subtitle :type: bool Whether to use the current value as the subtitle. If you use a custom list item factory, you will need to give the row a name conversion expression with :obj:`~gi.repository.Adw.ComboRow.props.expression`. If set to ``TRUE``, you should not access :obj:`~gi.repository.Adw.ActionRow.props.subtitle`. The subtitle is interpreted as Pango markup if :obj:`~gi.repository.Adw.PreferencesRow.props.use_markup` is set to ``TRUE``. Fields ------ .. rst-class:: interim-class .. class:: ComboRow :no-index: .. attribute:: parent_instance