The gtk.notebook.Notebook implementation of the gtk.buildable.Buildable interface
supports placing children into tabs by specifying “tab” as the
“type” attribute of a <child> element. Note that the content
of the tab must be created before the tab can be filled.
A tab child can be specified without specifying a <child>
type attribute.
To add a child widget in the notebooks action area, specify
"action-start" or “action-end” as the “type” attribute of the
<child> element.
gtk.notebook.Notebook has a main CSS node with name notebook, a subnode
with name header and below that a subnode with name tabs which
contains one subnode per tab with name tab.
If action widgets are present, their CSS nodes are placed next
to the tabs node. If the notebook is scrollable, CSS nodes with
name arrow are placed as first and last child of the tabs node.
The header node gets one of the style class .top, .bottom,
.left or .right, depending on where the tabs are placed. For
reorderable pages, the tab node gets the .reorderable-page class.
A tab node gets the .dnd style class while it is moved with drag-and-drop.
The nodes are always arranged from left-to-right, regardless of text direction.
gtk.notebook.Notebook is a container whose children are pages switched between using tabs.
There are many configuration options for gtk.notebook.Notebook. Among other things, you can choose on which edge the tabs appear (see gtk.notebook.Notebook.setTabPos), whether, if there are too many tabs to fit the notebook should be made bigger or scrolling arrows added (see gtk.notebook.Notebook.setScrollable), and whether there will be a popup menu allowing the users to switch pages. (see gtk.notebook.Notebook.popupEnable).
GtkNotebook as GtkBuildable
The gtk.notebook.Notebook implementation of the gtk.buildable.Buildable interface supports placing children into tabs by specifying “tab” as the “type” attribute of a <child> element. Note that the content of the tab must be created before the tab can be filled. A tab child can be specified without specifying a <child> type attribute.
To add a child widget in the notebooks action area, specify "action-start" or “action-end” as the “type” attribute of the <child> element.
An example of a UI definition fragment with gtk.notebook.Notebook:
CSS nodes
gtk.notebook.Notebook has a main CSS node with name notebook, a subnode with name header and below that a subnode with name tabs which contains one subnode per tab with name tab.
If action widgets are present, their CSS nodes are placed next to the tabs node. If the notebook is scrollable, CSS nodes with name arrow are placed as first and last child of the tabs node.
The main node gets the .frame style class when the notebook has a border (see gtk.notebook.Notebook.setShowBorder).
The header node gets one of the style class .top, .bottom, .left or .right, depending on where the tabs are placed. For reorderable pages, the tab node gets the .reorderable-page class.
A tab node gets the .dnd style class while it is moved with drag-and-drop.
The nodes are always arranged from left-to-right, regardless of text direction.
Accessibility
gtk.notebook.Notebook uses the following roles: