EntryRow#

Added in version 1.2.

class EntryRow(**properties: Any)#

Superclasses: PreferencesRow, ListBoxRow, Widget, InitiallyUnowned, Object

Subclasses: PasswordEntryRow

Implemented Interfaces: Accessible, Actionable, Buildable, ConstraintTarget, Editable

A ListBoxRow with an embedded text entry.

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 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 Editable API.

See also PasswordEntryRow.

AdwEntryRow as GtkBuildable#

The AdwEntryRow implementation of the Buildable interface supports adding a child at its end by specifying “suffix” or omitting the “type” attribute of a <child> element.

It also supports adding a child as a prefix widget by specifying “prefix” as the “type” attribute of a <child> element.

CSS nodes#

AdwEntryRow has a single CSS node with name row and the .entry style class.

Constructors#

class EntryRow
classmethod new() Widget#

Creates a new AdwEntryRow.

Added in version 1.2.

Methods#

class EntryRow
add_prefix(widget: Widget) None#

Adds a prefix widget to self.

Added in version 1.2.

Parameters:

widget – a widget

add_suffix(widget: Widget) None#

Adds a suffix widget to self.

Added in version 1.2.

Parameters:

widget – a widget

get_activates_default() bool#

Gets whether activating the embedded entry can activate the default widget.

Added in version 1.2.

get_attributes() AttrList | None#

Gets Pango attributes applied to the text of the embedded entry.

Added in version 1.2.

get_enable_emoji_completion() bool#

Gets whether to suggest emoji replacements on self.

Added in version 1.2.

get_input_hints() InputHints#

Gets the additional input hints of self.

Added in version 1.2.

get_input_purpose() InputPurpose#

Gets the input purpose of self.

Added in version 1.2.

get_max_length() int#

Retrieves the maximum length of the entry.

Added in version 1.6.

get_show_apply_button() bool#

Gets whether self can show the apply button.

Added in version 1.2.

get_text_length() int#

Retrieves the current length of the text in self.

Added in version 1.5.

grab_focus_without_selecting() bool#

Causes self to have keyboard focus without selecting the text.

See grab_focus_without_selecting for more information.

Added in version 1.3.

remove(widget: Widget) None#

Removes a child from self.

Added in version 1.2.

Parameters:

widget – the child to be removed

set_activates_default(activates: bool) None#

Sets whether activating the embedded entry can activate the default widget.

Added in version 1.2.

Parameters:

activates – whether to activate the default widget

set_attributes(attributes: AttrList | None = None) None#

Sets Pango attributes to apply to the text of the embedded entry.

The Attribute's start_index and end_index must refer to the EntryBuffer text, i.e. without the preedit string.

Added in version 1.2.

Parameters:

attributes – a list of attributes

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:.

Added in version 1.2.

Parameters:

enable_emoji_completion – Whether emoji completion should be enabled or not

set_input_hints(hints: InputHints) None#

Set additional input hints for self.

Input hints allow input methods to fine-tune their behavior.

See also: input_purpose

Added in version 1.2.

Parameters:

hints – the hints

set_input_purpose(purpose: InputPurpose) None#

Sets the input purpose of self.

The input purpose can be used by input methods to adjust their behavior.

Added in version 1.2.

Parameters:

purpose – the purpose

set_max_length(max_length: int) None#

Sets the maximum length of the entry.

Added in version 1.6.

Parameters:

max_length – maximum length of the entry

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 Enter key will hide the button and emit the 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.

Added in version 1.2.

Parameters:

show_apply_button – whether to show the apply button

Properties#

class EntryRow
props.activates_default: bool#

The type of the None singleton.

Added in version 1.2.

props.attributes: AttrList#

The type of the None singleton.

Added in version 1.2.

props.enable_emoji_completion: bool#

The type of the None singleton.

Added in version 1.2.

props.input_hints: InputHints#

The type of the None singleton.

Added in version 1.2.

props.input_purpose: InputPurpose#

The type of the None singleton.

Added in version 1.2.

props.max_length: int#

The type of the None singleton.

Added in version 1.6.

props.show_apply_button: bool#

The type of the None singleton.

Added in version 1.2.

props.text_length: int#

The type of the None singleton.

Added in version 1.5.

Signals#

class EntryRow.signals
apply() None#

The type of the None singleton.

Added in version 1.2.

entry_activated() None#

The type of the None singleton.

Added in version 1.2.

Fields#

class EntryRow
parent_instance#