GtkNotebook
A tabbed container widget.
Preview
Page 1
Page 2
Content of page 1
Content of page 2
CSS Node Tree
notebook[.frame]
├── header[.top|.bottom|.left|.right]
│ └── tabs
│ ├── [arrow.down] (scrollable, when the tabs don't fit)
│ ├── tab[:checked][.reorderable-page][.dnd] (per page)
│ └── [arrow.up]
└── stack (every page; the current one is visible)Props
Prop
Type
Behavior
- Use
GtkNotebookPagechildren to declare each tab and its content. - Tabs can be positioned at top, bottom, left, or right via
tabPos. - Every page stays mounted, so pages keep their state, and the notebook is as large as its largest page.
- The notebook itself takes the keyboard focus for its tabs: the arrow keys, Home and End switch pages, Down moves into the page and Up comes back, and Ctrl+PageUp/PageDown switch pages from anywhere inside.
- With
scrollable, tabs that don't fit are hidden and arrow buttons switch pages. - A
reorderablepage can be dragged, or moved with Alt+arrow keys, Alt+Home and Alt+End;onPageReorderedreports the new position and the app reorders its pages.