Skip to content

Gtk.StackPage

class — extends GObject.Object, Accessible

An auxiliary class used by GtkStack.

Methods

get_child

def get_child(self) -> Widget

Returns the stack child to which self belongs.

get_icon_name

def get_icon_name(self) -> str | None

Returns the icon name of the page.

get_name

def get_name(self) -> str | None

Returns the name of the page.

get_needs_attention

def get_needs_attention(self) -> bool

Returns whether the page is marked as “needs attention”.

get_title

def get_title(self) -> str | None

Gets the page title.

get_use_underline

def get_use_underline(self) -> bool

Gets whether underlines in the page title indicate mnemonics.

get_visible

def get_visible(self) -> bool

Returns whether page is visible in its GtkStack.

This is independent from the Widget.visible property of its widget.

set_icon_name

def set_icon_name(self, setting: str) -> None

Sets the icon name of the page.

Parameters:

  • setting — the new value to set

set_name

def set_name(self, setting: str) -> None

Sets the name of the page.

Parameters:

  • setting — the new value to set

set_needs_attention

def set_needs_attention(self, setting: bool) -> None

Sets whether the page is marked as “needs attention”.

Parameters:

  • setting — the new value to set

set_title

def set_title(self, setting: str) -> None

Sets the page title.

Parameters:

  • setting — the new value to set

set_use_underline

def set_use_underline(self, setting: bool) -> None

Sets whether underlines in the page title indicate mnemonics.

Parameters:

  • setting — the new value to set

set_visible

def set_visible(self, visible: bool) -> None

Sets whether page is visible in its GtkStack.

Parameters:

  • visible — The new property value

Properties

child

child: Widget  # read/write

The child that this page is for.

icon_name

icon_name: str  # read/write

The icon name of the child page.

name

name: str  # read/write

The name of the child page.

needs_attention

needs_attention: bool  # read/write

Whether the page requires the user attention.

This is used by the StackSwitcher to change the appearance of the corresponding button when a page needs attention and it is not the current one.

title

title: str  # read/write

The title of the child page.

use_underline

use_underline: bool  # read/write

If set, an underline in the title indicates a mnemonic.

visible

visible: bool  # read/write

Whether this page is visible.