Object Hierarchy:

Object hierarchy for StackSwitcher


[ CCode ( type_id = "gtk_stack_switcher_get_type ()" ) ]
public class StackSwitcher : Widget, Accessible, Buildable, ConstraintTarget

The GtkStackSwitcher widget acts as a controller for a Stack; it shows a row of buttons to switch between the various pages of the associated stack widget.

All the content for the buttons comes from the child properties of the Stack; the button visibility in a StackSwitcher widget is controlled by the visibility of the child in the Stack.

It is possible to associate multiple StackSwitcher widgets with the same Stack widget.

CSS nodes

GtkStackSwitcher has a single CSS node named stackswitcher and style class .stack-switcher.

When circumstances require it, GtkStackSwitcher adds the .needs-attention style class to the widgets representing the stack pages.


GtkStackSwitcher uses the TAB_LIST role and uses the TAB for its buttons.

Namespace: Gtk
Package: gtk4



Creation methods:


Inherited Members:

All known members inherited from class Gtk.Widget