Transitions between pages can be animated as slides or fades. This
can be controlled with gtk.stack.Stack.setTransitionType.
These animations respect the property@Gtk.Settings:gtk-enable-animations
setting.
To set child-specific properties in a .ui file, create gtk.stack_page.StackPage
objects explicitly, and set the child widget as a property on it:
<objectclass="GtkStack"id="stack"><child><objectclass="GtkStackPage"><propertyname="name">page1</property><propertyname="title">In the beginning…</property><propertyname="child"><objectclass="GtkLabel"><propertyname="label">It was dark</property></object></property></object></child>
gtk.stack.Stack is a container which only shows one of its children at a time.
In contrast to gtk.notebook.Notebook, gtk.stack.Stack does not provide a means for users to change the visible child. Instead, a separate widget such as gtk.stack_switcher.StackSwitcher or gtk.stack_sidebar.StackSidebar can be used with gtk.stack.Stack to provide this functionality.
Transitions between pages can be animated as slides or fades. This can be controlled with gtk.stack.Stack.setTransitionType. These animations respect the property@Gtk.Settings:gtk-enable-animations setting.
gtk.stack.Stack maintains a gtk.stack_page.StackPage object for each added child, which holds additional per-child properties. You obtain the gtk.stack_page.StackPage for a child with gtk.stack.Stack.getPage and you can obtain a gtk.selection_model.SelectionModel containing all the pages with gtk.stack.Stack.getPages.
GtkStack as GtkBuildable
To set child-specific properties in a .ui file, create gtk.stack_page.StackPage objects explicitly, and set the child widget as a property on it:
CSS nodes
gtk.stack.Stack has a single CSS node named stack.
Accessibility
gtk.stack.Stack uses the gtk.types.AccessibleRole.TabPanel for the stack pages, which are the accessible parent objects of the child widgets.