ExpanderRow
Superclasses: PreferencesRow
, ListBoxRow
, Widget
, InitiallyUnowned
, Object
Implemented Interfaces: Accessible
, Actionable
, Buildable
, ConstraintTarget
A ListBoxRow
used to reveal widgets.
The AdwExpanderRow
widget allows the user to reveal or hide widgets below
it. It also allows the user to enable the expansion of the row, allowing to
disable all that the row contains.
AdwExpanderRow as GtkBuildable
The AdwExpanderRow
implementation of the Buildable
interface
supports adding a child as an suffix widget by specifying “suffix” as the
“type” attribute of a <child> element.
It also supports adding it as a prefix widget by specifying “prefix” as the “type” attribute of a <child> element.
CSS nodes
AdwExpanderRow
has a main CSS node with name row
and the .expander
style class. It has the .empty
style class when it contains no children.
It contains the subnodes row.header
for its main embedded row,
list.nested
for the list it can expand, and image.expander-row-arrow
for
its arrow.
Constructors
Methods
- class ExpanderRow
- add_action(widget: Widget) None
Adds an action widget to
self
.Deprecated since version 1.4: Use
add_suffix
to add a suffix.- Parameters:
widget – a widget
- add_row(child: Widget) None
Adds a widget to
self
.The widget will appear in the expanding list below
self
.- Parameters:
child – a widget
- add_suffix(widget: Widget) None
Adds an suffix widget to
self
.Added in version 1.4.
- Parameters:
widget – a widget
- get_icon_name() str | None
Gets the icon name for
self
.Deprecated since version 1.3: Use
add_prefix
to add an icon.
- get_subtitle_lines() int
Gets the number of lines at the end of which the subtitle label will be ellipsized.
Added in version 1.3.
- get_title_lines() int
Gets the number of lines at the end of which the title label will be ellipsized.
Added in version 1.3.
- set_enable_expansion(enable_expansion: bool) None
Sets whether the expansion of
self
is enabled.- Parameters:
enable_expansion – whether to enable the expansion
- set_expanded(expanded: bool) None
Sets whether
self
is expanded.- Parameters:
expanded – whether to expand the row
- set_icon_name(icon_name: str | None = None) None
Sets the icon name for
self
.Deprecated since version 1.3: Use
add_prefix
to add an icon.- Parameters:
icon_name – the icon name
- set_show_enable_switch(show_enable_switch: bool) None
Sets whether the switch enabling the expansion of
self
is visible.- Parameters:
show_enable_switch – whether to show the switch enabling the expansion
- set_subtitle(subtitle: str) None
Sets the subtitle for
self
.The subtitle is interpreted as Pango markup unless
use_markup
is set toFALSE
.- Parameters:
subtitle – the subtitle
- set_subtitle_lines(subtitle_lines: int) None
Sets the number of lines at the end of which the subtitle label will be ellipsized.
If the value is 0, the number of lines won’t be limited.
Added in version 1.3.
- Parameters:
subtitle_lines – the number of lines at the end of which the subtitle label will be ellipsized
- set_title_lines(title_lines: int) None
Sets the number of lines at the end of which the title label will be ellipsized.
If the value is 0, the number of lines won’t be limited.
Added in version 1.3.
- Parameters:
title_lines – the number of lines at the end of which the title label will be ellipsized
Properties
- class ExpanderRow
-
- props.icon_name: str
The icon name for this row.
Deprecated since version 1.3: Use
add_prefix
to add an icon.
- props.subtitle: str
The subtitle for this row.
The subtitle is interpreted as Pango markup unless
use_markup
is set toFALSE
.
Fields
- class ExpanderRow
- parent_instance