:right-sidebar: True EntryRow =================================================================== .. currentmodule:: gi.repository.Adw .. versionadded:: 1.2 .. class:: EntryRow(**properties: ~typing.Any) :no-contents-entry: Superclasses: :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` Subclasses: :class:`~gi.repository.Adw.PasswordEntryRow` Implemented Interfaces: :class:`~gi.repository.Gtk.Accessible`, :class:`~gi.repository.Gtk.Actionable`, :class:`~gi.repository.Gtk.Buildable`, :class:`~gi.repository.Gtk.ConstraintTarget`, :class:`~gi.repository.Gtk.Editable` A :obj:`~gi.repository.Gtk.ListBoxRow` with an embedded text entry. .. image:: https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1-latest/entry-row.png ``AdwEntryRow`` has a title that doubles as placeholder text. It shows an icon indicating that it's editable and can receive additional widgets before or after the editable part. If :obj:`~gi.repository.Adw.EntryRow.props.show_apply_button` is set to ``TRUE``\, ``AdwEntryRow`` can show an apply button when editing its contents. This can be useful if changing its contents can result in an expensive operation, such as network activity. ``AdwEntryRow`` provides only minimal API and should be used with the :obj:`~gi.repository.Gtk.Editable` API. See also :obj:`~gi.repository.Adw.PasswordEntryRow`\. AdwEntryRow as GtkBuildable -------------------------------------------------------------------------------- The ``AdwEntryRow`` implementation of the :obj:`~gi.repository.Gtk.Buildable` interface supports adding a child at its end by specifying “suffix” or omitting the “type” attribute of a element. It also supports adding a child as a prefix widget by specifying “prefix” as the “type” attribute of a element. CSS nodes -------------------------------------------------------------------------------- ``AdwEntryRow`` has a single CSS node with name ``row`` and the ``.entry`` style class. Constructors ------------ .. rst-class:: interim-class .. class:: EntryRow :no-index: .. classmethod:: new() -> ~gi.repository.Gtk.Widget Creates a new ``AdwEntryRow``\. .. versionadded:: 1.2 Methods ------- .. rst-class:: interim-class .. class:: EntryRow :no-index: .. method:: add_prefix(widget: ~gi.repository.Gtk.Widget) -> None Adds a prefix widget to ``self``\. .. versionadded:: 1.2 :param widget: a widget .. method:: add_suffix(widget: ~gi.repository.Gtk.Widget) -> None Adds a suffix widget to ``self``\. .. versionadded:: 1.2 :param widget: a widget .. method:: get_activates_default() -> bool Gets whether activating the embedded entry can activate the default widget. .. versionadded:: 1.2 .. method:: get_attributes() -> ~gi.repository.Pango.AttrList | None Gets Pango attributes applied to the text of the embedded entry. .. versionadded:: 1.2 .. method:: get_enable_emoji_completion() -> bool Gets whether to suggest emoji replacements on ``self``\. .. versionadded:: 1.2 .. method:: get_input_hints() -> ~gi.repository.Gtk.InputHints Gets the additional input hints of ``self``\. .. versionadded:: 1.2 .. method:: get_input_purpose() -> ~gi.repository.Gtk.InputPurpose Gets the input purpose of ``self``\. .. versionadded:: 1.2 .. method:: get_max_length() -> int Retrieves the maximum length of the entry. .. versionadded:: 1.6 .. method:: get_show_apply_button() -> bool Gets whether ``self`` can show the apply button. .. versionadded:: 1.2 .. method:: get_text_length() -> int Retrieves the current length of the text in ``self``\. .. versionadded:: 1.5 .. method:: grab_focus_without_selecting() -> bool Causes ``self`` to have keyboard focus without selecting the text. See :obj:`~gi.repository.Gtk.Text.grab_focus_without_selecting` for more information. .. versionadded:: 1.3 .. method:: remove(widget: ~gi.repository.Gtk.Widget) -> None Removes a child from ``self``\. .. versionadded:: 1.2 :param widget: the child to be removed .. method:: set_activates_default(activates: bool) -> None Sets whether activating the embedded entry can activate the default widget. .. versionadded:: 1.2 :param activates: whether to activate the default widget .. method:: set_attributes(attributes: ~gi.repository.Pango.AttrList | None = None) -> None Sets Pango attributes to apply to the text of the embedded entry. The :obj:`~gi.repository.Pango.Attribute`\'s ``start_index`` and ``end_index`` must refer to the :obj:`~gi.repository.Gtk.EntryBuffer` text, i.e. without the preedit string. .. versionadded:: 1.2 :param attributes: a list of attributes .. method:: set_enable_emoji_completion(enable_emoji_completion: bool) -> None Sets whether to suggest emoji replacements on ``self``\. Emoji replacement is done with :-delimited names, like ``:heart:``\. .. versionadded:: 1.2 :param enable_emoji_completion: Whether emoji completion should be enabled or not .. method:: set_input_hints(hints: ~gi.repository.Gtk.InputHints) -> None Set additional input hints for ``self``\. Input hints allow input methods to fine-tune their behavior. See also: :obj:`~gi.repository.Adw.AdwEntryRow.props.input_purpose` .. versionadded:: 1.2 :param hints: the hints .. method:: set_input_purpose(purpose: ~gi.repository.Gtk.InputPurpose) -> None Sets the input purpose of ``self``\. The input purpose can be used by input methods to adjust their behavior. .. versionadded:: 1.2 :param purpose: the purpose .. method:: set_max_length(max_length: int) -> None Sets the maximum length of the entry. .. versionadded:: 1.6 :param max_length: maximum length of the entry .. method:: set_show_apply_button(show_apply_button: bool) -> None Sets whether ``self`` can show the apply button. When set to ``TRUE``\, typing text in the entry will reveal an apply button. Clicking it or pressing the :kbd:`Enter` key will hide the button and emit the :obj:`~gi.repository.Adw.EntryRow.signals.apply` signal. This is useful if changing the entry contents can trigger an expensive operation, e.g. network activity, to avoid triggering it after typing every character. .. versionadded:: 1.2 :param show_apply_button: whether to show the apply button Properties ---------- .. rst-class:: interim-class .. class:: EntryRow :no-index: .. attribute:: props.activates_default :type: bool The type of the None singleton. .. versionadded:: 1.2 .. attribute:: props.attributes :type: ~gi.repository.Pango.AttrList The type of the None singleton. .. versionadded:: 1.2 .. attribute:: props.enable_emoji_completion :type: bool The type of the None singleton. .. versionadded:: 1.2 .. attribute:: props.input_hints :type: ~gi.repository.Gtk.InputHints The type of the None singleton. .. versionadded:: 1.2 .. attribute:: props.input_purpose :type: ~gi.repository.Gtk.InputPurpose The type of the None singleton. .. versionadded:: 1.2 .. attribute:: props.max_length :type: int The type of the None singleton. .. versionadded:: 1.6 .. attribute:: props.show_apply_button :type: bool The type of the None singleton. .. versionadded:: 1.2 .. attribute:: props.text_length :type: int The type of the None singleton. .. versionadded:: 1.5 Signals ------- .. rst-class:: interim-class .. class:: EntryRow.signals :no-index: .. method:: apply() -> None The type of the None singleton. .. versionadded:: 1.2 .. method:: entry_activated() -> None The type of the None singleton. .. versionadded:: 1.2 Fields ------ .. rst-class:: interim-class .. class:: EntryRow :no-index: .. attribute:: parent_instance