Gtk.Notebook¶
Methods¶
| Inherited: | Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10) | 
|---|---|
| Structs: | Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5) | 
Virtual Methods¶
| Inherited: | Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10) | 
|---|
| do_change_current_page(offset) | |
| do_focus_tab(type) | |
| do_insert_page(child, tab_label, menu_label, position) | |
| do_move_focus_out(direction) | |
| do_page_added(child, page_num) | |
| do_page_removed(child, page_num) | |
| do_page_reordered(child, page_num) | |
| do_reorder_tab(direction, move_to_last) | |
| do_select_page(move_focus) | |
| do_switch_page(page, page_num) | 
Properties¶
| Inherited: | Gtk.Container (3), Gtk.Widget (39) | 
|---|
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| enable-popup | bool | r/w/en | If True, pressing the right mouse button on the notebook pops up a menu that you can use to go to a page | 
| group-name | str | r/w/en | Group name for tab drag and drop | 
| page | int | r/w/en | The index of the current page | 
| scrollable | bool | r/w/en | If True, scroll arrows are added if there are too many tabs to fit | 
| show-border | bool | r/w/en | Whether the border should be shown | 
| show-tabs | bool | r/w/en | Whether tabs should be shown | 
| tab-pos | Gtk.PositionType | r/w/en | Which side of the notebook holds the tabs | 
Child Properties¶
| Name | Type | Default | Flags | Short Description | 
|---|---|---|---|---|
| detachable | bool | False | r/w | Whether the tab is detachable | 
| menu-label | str | None | r/w | The string displayed in the child’s menu entry | 
| position | int | 0 | r/w | The index of the child in the parent | 
| reorderable | bool | False | r/w | Whether the tab is reorderable by user action | 
| tab-expand | bool | False | r/w | Whether to expand the child’s tab | 
| tab-fill | bool | True | r/w | Whether the child’s tab should fill the allocated area | 
| tab-label | str | None | r/w | The string displayed on the child’s tab label | 
Style Properties¶
| Inherited: | Gtk.Widget (17) | 
|---|
| Name | Type | Default | Flags | Short Description | 
|---|---|---|---|---|
| arrow-spacing | int | 0 | d/r | Scroll arrow spacing deprecated | 
| has-backward-stepper | bool | True | r | xlib.Displaythe standard backward arrow button | 
| has-forward-stepper | bool | True | r | xlib.Displaythe standard forward arrow button | 
| has-secondary-backward-stepper | bool | False | r | xlib.Displaya second backward arrow button on the opposite end of the tab area | 
| has-secondary-forward-stepper | bool | False | r | xlib.Displaya second forward arrow button on the opposite end of the tab area | 
| has-tab-gap | bool | True | d/r | Active tab is drawn with a gap at the bottom deprecated | 
| initial-gap | int | 0 | d/r | Initial gap before the first tab deprecated | 
| tab-curvature | int | 1 | d/r | Size of tab curvature deprecated | 
| tab-overlap | int | 2 | d/r | Size of tab overlap area deprecated | 
Signals¶
| Inherited: | Gtk.Container (4), Gtk.Widget (69), GObject.Object (1) | 
|---|
| Name | Short Description | 
|---|---|
| change-current-page | |
| create-window | The ::create-windowsignal is emitted when a detachable tab is dropped on the root window. | 
| focus-tab | |
| move-focus-out | |
| page-added | the ::page-addedsignal is emitted in the notebook right after a page is added to the notebook. | 
| page-removed | the ::page-removedsignal is emitted in the notebook right after a page is removed from the notebook. | 
| page-reordered | the ::page-reorderedsignal is emitted in the notebook right after a page has been reordered. | 
| reorder-tab | |
| select-page | |
| switch-page | Emitted when the user or a function changes the current page. | 
Fields¶
| Inherited: | Gtk.Container (4), Gtk.Widget (69), GObject.Object (1) | 
|---|
| Name | Type | Access | Description | 
|---|---|---|---|
| container | Gtk.Container | r | 
Class Details¶
- 
class Gtk.Notebook(**kwargs)¶
- Bases: - Gtk.Container- Abstract: - No - Structure: - Gtk.NotebookClass- The - Gtk.Notebookwidget is a- Gtk.Containerwhose children are pages that can be switched between using tab labels along one edge.- There are many configuration options for - Gtk.Notebook. Among other things, you can choose on which edge the tabs appear (see- Gtk.Notebook.set_tab_pos()), whether, if there are too many tabs to fit the notebook should be made bigger or scrolling arrows added (see- Gtk.Notebook.set_scrollable()), and whether there will be a popup menu allowing the users to switch pages. (see- Gtk.Notebook.popup_enable(),- Gtk.Notebook.popup_disable())- The - Gtk.Notebookimplementation of the- Gtk.Buildableinterface 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:- <object class="GtkNotebook"> <child> <object class="GtkLabel" id="notebook-content"> <property name="label">Content</property> </object> </child> <child type="tab"> <object class="GtkLabel" id="notebook-tab"> <property name="label">Tab</property> </object> </child> </object>- CSS nodes
 - notebook ├── header.top │ ├── [<action widget>] │ ├── tabs │ │ ├── [arrow] │ │ ├── tab │ │ │ ╰── <tab label> ┊ ┊ ┊ │ │ ├── tab[.reorderable-page] │ │ │ ╰── <tab label> │ │ ╰── [arrow] │ ╰── [<action widget>] │ ╰── stack ├── <child> ┊ ╰── <child>- Gtk.Notebookhas 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.set_show_border()).- 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, regarldess of text direction. - 
classmethod new()[source]¶
- Returns: - the newly created - Gtk.Notebook- Return type: - Gtk.Widget- Creates a new - Gtk.Notebookwidget with no pages.
 - 
append_page(child, tab_label)[source]¶
- Parameters: - child (Gtk.Widget) – theGtk.Widgetto use as the contents of the page
- tab_label (Gtk.WidgetorNone) – theGtk.Widgetto be used as the label for the page, orNoneto use the default label, “page N”
 - Returns: - the index (starting from 0) of the appended page in the notebook, or -1 if function fails - Return type: - Appends a page to self. 
- child (
 - Parameters: - child (Gtk.Widget) – theGtk.Widgetto use as the contents of the page
- tab_label (Gtk.WidgetorNone) – theGtk.Widgetto be used as the label for the page, orNoneto use the default label, “page N”
- menu_label (Gtk.WidgetorNone) – the widget to use as a label for the page-switch menu, if that is enabled. IfNone, and tab_label is aGtk.LabelorNone, then the menu label will be a newly created label with the same text as tab_label; if tab_label is not aGtk.Label, menu_label must be specified if the page-switch menu is to be used.
 - Returns: - the index (starting from 0) of the appended page in the notebook, or -1 if function fails - Return type: - Appends a page to self, specifying the widget to use as the label in the popup menu. 
- child (
 - 
detach_tab(child)[source]¶
- Parameters: - child ( - Gtk.Widget) – a child- Removes the child from the notebook. - This function is very similar to - Gtk.Container.remove(), but additionally informs the notebook that the removal is happening as part of a tab DND operation, which should not be cancelled.- New in version 3.16. 
 - 
get_action_widget(pack_type)[source]¶
- Parameters: - pack_type ( - Gtk.PackType) – pack type of the action widget to receive- Returns: - The action widget with the given pack_type or - Nonewhen this action widget has not been set- Return type: - Gtk.Widgetor- None- Gets one of the action widgets. See - Gtk.Notebook.set_action_widget().- New in version 2.20. 
 - 
get_current_page()[source]¶
- Returns: - the index (starting from 0) of the current page in the notebook. If the notebook has no pages, then -1 will be returned. - Return type: - int- Returns the page number of the current page. 
 - 
get_group_name()[source]¶
- Returns: - the group name, or - Noneif none is set- Return type: - stror- None- Gets the current group name for self. - New in version 2.24. 
 - Parameters: - child ( - Gtk.Widget) – a widget contained in a page of self- Returns: - the menu label, or - Noneif the notebook page does not have a menu label other than the default (the tab label).- Return type: - Gtk.Widgetor- None- Retrieves the menu label widget of the page containing child. 
 - Parameters: - child ( - Gtk.Widget) – the child widget of a page of the notebook.- Returns: - the text of the tab label, or - Noneif the widget does not have a menu label other than the default menu label, or the menu label widget is not a- Gtk.Label. The string is owned by the widget and must not be freed.- Return type: - stror- None- Retrieves the text of the menu label for the page containing child. 
 - 
get_n_pages()[source]¶
- Returns: - the number of pages in the notebook - Return type: - int- Gets the number of pages in a notebook. - New in version 2.2. 
 - 
get_nth_page(page_num)[source]¶
- Parameters: - page_num ( - int) – the index of a page in the notebook, or -1 to get the last page- Returns: - the child widget, or - Noneif page_num is out of bounds- Return type: - Gtk.Widgetor- None- Returns the child widget contained in page number page_num. 
 - 
get_scrollable()[source]¶
- Returns: - Trueif arrows for scrolling are present- Return type: - bool- Returns whether the tab label area has arrows for scrolling. See - Gtk.Notebook.set_scrollable().
 - 
get_show_border()[source]¶
- Returns: - Trueif the bevel is drawn- Return type: - bool- Returns whether a bevel will be drawn around the notebook pages. See - Gtk.Notebook.set_show_border().
 - 
get_show_tabs()[source]¶
- Returns: - Trueif the tabs are shown- Return type: - bool- Returns whether the tabs of the notebook are shown. See - Gtk.Notebook.set_show_tabs().
 - 
get_tab_detachable(child)[source]¶
- Parameters: - child ( - Gtk.Widget) – a child- Gtk.Widget- Returns: - Trueif the tab is detachable.- Return type: - bool- Returns whether the tab contents can be detached from self. - New in version 2.10. 
 - 
get_tab_hborder()[source]¶
- Returns: - horizontal width of a tab border - Return type: - int- Returns the horizontal width of a tab border. - New in version 2.22. - Deprecated since version 3.4: this function returns zero 
 - 
get_tab_label(child)[source]¶
- Parameters: - child ( - Gtk.Widget) – the page- Returns: - the tab label - Return type: - Gtk.Widgetor- None- Returns the tab label widget for the page child. - Noneis returned if child is not in self or if no tab label has specifically been set for child.
 - 
get_tab_label_text(child)[source]¶
- Parameters: - child ( - Gtk.Widget) – a widget contained in a page of self- Returns: - the text of the tab label, or - Noneif the tab label widget is not a- Gtk.Label. The string is owned by the widget and must not be freed.- Return type: - stror- None- Retrieves the text of the tab label for the page containing child. 
 - 
get_tab_pos()[source]¶
- Returns: - the edge at which the tabs are drawn - Return type: - Gtk.PositionType- Gets the edge at which the tabs for switching pages in the notebook are drawn. 
 - 
get_tab_reorderable(child)[source]¶
- Parameters: - child ( - Gtk.Widget) – a child- Gtk.Widget- Returns: - Trueif the tab is reorderable.- Return type: - bool- Gets whether the tab can be reordered via drag and drop or not. - New in version 2.10. 
 - 
get_tab_vborder()[source]¶
- Returns: - vertical width of a tab border - Return type: - int- Returns the vertical width of a tab border. - New in version 2.22. - Deprecated since version 3.4: this function returns zero 
 - 
insert_page(child, tab_label, position)[source]¶
- Parameters: - child (Gtk.Widget) – theGtk.Widgetto use as the contents of the page
- tab_label (Gtk.WidgetorNone) – theGtk.Widgetto be used as the label for the page, orNoneto use the default label, “page N”
- position (int) – the index (starting at 0) at which to insert the page, or -1 to append the page after all other pages
 - Returns: - the index (starting from 0) of the inserted page in the notebook, or -1 if function fails - Return type: - Insert a page into self at the given position. 
- child (
 - Parameters: - child (Gtk.Widget) – theGtk.Widgetto use as the contents of the page
- tab_label (Gtk.WidgetorNone) – theGtk.Widgetto be used as the label for the page, orNoneto use the default label, “page N”
- menu_label (Gtk.WidgetorNone) – the widget to use as a label for the page-switch menu, if that is enabled. IfNone, and tab_label is aGtk.LabelorNone, then the menu label will be a newly created label with the same text as tab_label; if tab_label is not aGtk.Label, menu_label must be specified if the page-switch menu is to be used.
- position (int) – the index (starting at 0) at which to insert the page, or -1 to append the page after all other pages.
 - Returns: - the index (starting from 0) of the inserted page in the notebook - Return type: - Insert a page into self at the given position, specifying the widget to use as the label in the popup menu. 
- child (
 - 
next_page()[source]¶
- Switches to the next page. Nothing happens if the current page is the last page. 
 - 
page_num(child)[source]¶
- Parameters: - child ( - Gtk.Widget) – a- Gtk.Widget- Returns: - the index of the page containing child, or -1 if child is not in the notebook - Return type: - int- Finds the index of the page which contains the given child widget. 
 - 
popup_enable()[source]¶
- Enables the popup menu: if the user clicks with the right mouse button on the tab labels, a menu with all the pages will be popped up. 
 - 
prepend_page(child, tab_label)[source]¶
- Parameters: - child (Gtk.Widget) – theGtk.Widgetto use as the contents of the page
- tab_label (Gtk.WidgetorNone) – theGtk.Widgetto be used as the label for the page, orNoneto use the default label, “page N”
 - Returns: - the index (starting from 0) of the prepended page in the notebook, or -1 if function fails - Return type: - Prepends a page to self. 
- child (
 - Parameters: - child (Gtk.Widget) – theGtk.Widgetto use as the contents of the page
- tab_label (Gtk.WidgetorNone) – theGtk.Widgetto be used as the label for the page, orNoneto use the default label, “page N”
- menu_label (Gtk.WidgetorNone) – the widget to use as a label for the page-switch menu, if that is enabled. IfNone, and tab_label is aGtk.LabelorNone, then the menu label will be a newly created label with the same text as tab_label; if tab_label is not aGtk.Label, menu_label must be specified if the page-switch menu is to be used.
 - Returns: - the index (starting from 0) of the prepended page in the notebook, or -1 if function fails - Return type: - Prepends a page to self, specifying the widget to use as the label in the popup menu. 
- child (
 - 
prev_page()[source]¶
- Switches to the previous page. Nothing happens if the current page is the first page. 
 - 
remove_page(page_num)[source]¶
- Parameters: - page_num ( - int) – the index of a notebook page, starting from 0. If -1, the last page will be removed.- Removes a page from the notebook given its index in the notebook. 
 - 
reorder_child(child, position)[source]¶
- Parameters: - child (Gtk.Widget) – the child to move
- position (int) – the new position, or -1 to move to the end
 - Reorders the page containing child, so that it appears in position position. If position is greater than or equal to the number of children in the list or negative, child will be moved to the end of the list. 
- child (
 - 
set_action_widget(widget, pack_type)[source]¶
- Parameters: - widget (Gtk.Widget) – aGtk.Widget
- pack_type (Gtk.PackType) – pack type of the action widget
 - Sets widget as one of the action widgets. Depending on the pack type the widget will be placed before or after the tabs. You can use a - Gtk.Boxif you need to pack more than one widget on the same side.- Note that action widgets are “internal” children of the notebook and thus not included in the list returned from - Gtk.Container.foreach().- New in version 2.20. 
- widget (
 - 
set_current_page(page_num)[source]¶
- Parameters: - page_num ( - int) – index of the page to switch to, starting from 0. If negative, the last page will be used. If greater than the number of pages in the notebook, nothing will be done.- Switches to the page number page_num. - Note that due to historical reasons, - Gtk.Notebookrefuses to switch to a page unless the child widget is visible. Therefore, it is recommended to show child widgets before adding them to a notebook.
 - 
set_group_name(group_name)[source]¶
- Parameters: - group_name ( - stror- None) – the name of the notebook group, or- Noneto unset it- Sets a group name for self. - Notebooks with the same name will be able to exchange tabs via drag and drop. A notebook with a - Nonegroup name will not be able to exchange tabs with any other notebook.- New in version 2.24. 
 - Parameters: - child (Gtk.Widget) – the child widget
- menu_label (Gtk.WidgetorNone) – the menu label, orNonefor default
 - Changes the menu label for the page containing child. 
- child (
 - Parameters: - child (Gtk.Widget) – the child widget
- menu_text (str) – the label text
 - Creates a new label and sets it as the menu label of child. 
- child (
 - 
set_scrollable(scrollable)[source]¶
- Parameters: - scrollable ( - bool) –- Trueif scroll arrows should be added- Sets whether the tab label area will have arrows for scrolling if there are too many tabs to fit in the area. 
 - 
set_show_border(show_border)[source]¶
- Parameters: - show_border ( - bool) –- Trueif a bevel should be drawn around the notebook- Sets whether a bevel will be drawn around the notebook pages. This only has a visual effect when the tabs are not shown. See - Gtk.Notebook.set_show_tabs().
 - 
set_show_tabs(show_tabs)[source]¶
- Parameters: - show_tabs ( - bool) –- Trueif the tabs should be shown- Sets whether to show the tabs for the notebook or not. 
 - 
set_tab_detachable(child, detachable)[source]¶
- Parameters: - child (Gtk.Widget) – a childGtk.Widget
- detachable (bool) – whether the tab is detachable or not
 - Sets whether the tab can be detached from self to another notebook or widget. - Note that 2 notebooks must share a common group identificator (see - Gtk.Notebook.set_group_name()) to allow automatic tabs interchange between them.- If you want a widget to interact with a notebook through DnD (i.e.: accept dragged tabs from it) it must be set as a drop destination and accept the target “GTK_NOTEBOOK_TAB”. The notebook will fill the selection with a - Gtk.Widgetpointing to the child widget that corresponds to the dropped tab.- Note that you should use - Gtk.Notebook.detach_tab() instead of- Gtk.Container.remove() if you want to remove the tab from the source notebook as part of accepting a drop. Otherwise, the source notebook will think that the dragged tab was removed from underneath the ongoing drag operation, and will initiate a drag cancel animation.- static void on_drag_data_received (GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data) { GtkWidget *notebook; GtkWidget **child; notebook = gtk_drag_get_source_widget (context); child = (void*) gtk_selection_data_get_data (data); // process_widget (*child); gtk_notebook_detach_tab (GTK_NOTEBOOK (notebook), *child); } - If you want a notebook to accept drags from other widgets, you will have to set your own DnD code to do it. - New in version 2.10. 
- child (
 - 
set_tab_label(child, tab_label)[source]¶
- Parameters: - child (Gtk.Widget) – the page
- tab_label (Gtk.WidgetorNone) – the tab label widget to use, orNonefor default tab label
 - Changes the tab label for child. If - Noneis specified for tab_label, then the page will have the label “page N”.
- child (
 - 
set_tab_label_text(child, tab_text)[source]¶
- Parameters: - child (Gtk.Widget) – the page
- tab_text (str) – the label text
 - Creates a new label and sets it as the tab label for the page containing child. 
- child (
 - 
set_tab_pos(pos)[source]¶
- Parameters: - pos ( - Gtk.PositionType) – the edge to draw the tabs at- Sets the edge at which the tabs for switching pages in the notebook are drawn. 
 - 
set_tab_reorderable(child, reorderable)[source]¶
- Parameters: - child (Gtk.Widget) – a childGtk.Widget
- reorderable (bool) – whether the tab is reorderable or not
 - Sets whether the notebook tab can be reordered via drag and drop or not. - New in version 2.10. 
- child (
 - 
do_focus_tab(type) virtual¶
- Parameters: - type ( - Gtk.NotebookTab) –- Return type: - bool
 - 
do_insert_page(child, tab_label, menu_label, position) virtual¶
- Parameters: - child (Gtk.Widget) –
- tab_label (Gtk.Widget) –
- menu_label (Gtk.Widget) –
- position (int) –
 - Return type: 
- child (
 - 
do_move_focus_out(direction) virtual¶
- Parameters: - direction ( - Gtk.DirectionType) –
 - 
do_page_added(child, page_num) virtual¶
- Parameters: - child (Gtk.Widget) –
- page_num (int) –
 
- child (
 - 
do_page_removed(child, page_num) virtual¶
- Parameters: - child (Gtk.Widget) –
- page_num (int) –
 
- child (
 - 
do_page_reordered(child, page_num) virtual¶
- Parameters: - child (Gtk.Widget) –
- page_num (int) –
 
- child (
 - 
do_reorder_tab(direction, move_to_last) virtual¶
- Parameters: - direction (Gtk.DirectionType) –
- move_to_last (bool) –
 - Return type: 
- direction (
 - 
do_switch_page(page, page_num) virtual¶
- Parameters: - page (Gtk.Widget) –
- page_num (int) –
 
- page (
 
Signal Details¶
- 
Gtk.Notebook.signals.change_current_page(notebook, object)¶
- Signal Name: - change-current-page- Flags: - Parameters: - notebook (Gtk.Notebook) – The object which received the signal
- object (int) –
 - Return type: 
- notebook (
- 
Gtk.Notebook.signals.create_window(notebook, page, x, y)¶
- Signal Name: - create-window- Flags: - Parameters: - notebook (Gtk.Notebook) – The object which received the signal
- page (Gtk.Widget) – the tab of notebook that is being detached
- x (int) – the X coordinate where the drop happens
- y (int) – the Y coordinate where the drop happens
 - Returns: - a - Gtk.Notebookthat page should be added to, or- None.- Return type: - The - ::create-windowsignal is emitted when a detachable tab is dropped on the root window.- A handler for this signal can create a window containing a notebook where the tab will be attached. It is also responsible for moving/resizing the window and adding the necessary properties to the notebook (e.g. the - Gtk.Notebook- :group-name).- New in version 2.12. 
- notebook (
- 
Gtk.Notebook.signals.focus_tab(notebook, object)¶
- Signal Name: - focus-tab- Flags: - Parameters: - notebook (Gtk.Notebook) – The object which received the signal
- object (Gtk.NotebookTab) –
 - Return type: 
- notebook (
- 
Gtk.Notebook.signals.move_focus_out(notebook, object)¶
- Signal Name: - move-focus-out- Flags: - Parameters: - notebook (Gtk.Notebook) – The object which received the signal
- object (Gtk.DirectionType) –
 
- notebook (
- 
Gtk.Notebook.signals.page_added(notebook, child, page_num)¶
- Signal Name: - page-added- Flags: - Parameters: - notebook (Gtk.Notebook) – The object which received the signal
- child (Gtk.Widget) – the childGtk.Widgetaffected
- page_num (int) – the new page number for child
 - the - ::page-addedsignal is emitted in the notebook right after a page is added to the notebook.- New in version 2.10. 
- notebook (
- 
Gtk.Notebook.signals.page_removed(notebook, child, page_num)¶
- Signal Name: - page-removed- Flags: - Parameters: - notebook (Gtk.Notebook) – The object which received the signal
- child (Gtk.Widget) – the childGtk.Widgetaffected
- page_num (int) – the child page number
 - the - ::page-removedsignal is emitted in the notebook right after a page is removed from the notebook.- New in version 2.10. 
- notebook (
- 
Gtk.Notebook.signals.page_reordered(notebook, child, page_num)¶
- Signal Name: - page-reordered- Flags: - Parameters: - notebook (Gtk.Notebook) – The object which received the signal
- child (Gtk.Widget) – the childGtk.Widgetaffected
- page_num (int) – the new page number for child
 - the - ::page-reorderedsignal is emitted in the notebook right after a page has been reordered.- New in version 2.10. 
- notebook (
- 
Gtk.Notebook.signals.reorder_tab(notebook, object, p0)¶
- Signal Name: - reorder-tab- Flags: - Parameters: - notebook (Gtk.Notebook) – The object which received the signal
- object (Gtk.DirectionType) –
- p0 (bool) –
 - Return type: 
- notebook (
- 
Gtk.Notebook.signals.select_page(notebook, object)¶
- Signal Name: - select-page- Flags: - Parameters: - notebook (Gtk.Notebook) – The object which received the signal
- object (bool) –
 - Return type: 
- notebook (
- 
Gtk.Notebook.signals.switch_page(notebook, page, page_num)¶
- Signal Name: - switch-page- Flags: - Parameters: - notebook (Gtk.Notebook) – The object which received the signal
- page (Gtk.Widget) – the new current page
- page_num (int) – the index of the page
 - Emitted when the user or a function changes the current page. 
- notebook (
Property Details¶
- 
Gtk.Notebook.props.enable_popup¶
- Name: - enable-popup- Type: - bool- Default Value: - False- Flags: - READABLE,- WRITABLE,- EXPLICIT_NOTIFY- If - True, pressing the right mouse button on the notebook pops up a menu that you can use to go to a page
- 
Gtk.Notebook.props.group_name¶
- Name: - group-name- Type: - str- Default Value: - None- Flags: - READABLE,- WRITABLE,- EXPLICIT_NOTIFY- Group name for tab drag and drop. - New in version 2.24. 
- 
Gtk.Notebook.props.page¶
- Name: - page- Type: - int- Default Value: - -1- Flags: - READABLE,- WRITABLE,- EXPLICIT_NOTIFY- The index of the current page 
- 
Gtk.Notebook.props.scrollable¶
- Name: - scrollable- Type: - bool- Default Value: - False- Flags: - READABLE,- WRITABLE,- EXPLICIT_NOTIFY- If - True, scroll arrows are added if there are too many tabs to fit
- 
Gtk.Notebook.props.show_border¶
- Name: - show-border- Type: - bool- Default Value: - True- Flags: - READABLE,- WRITABLE,- EXPLICIT_NOTIFY- Whether the border should be shown 
- 
Gtk.Notebook.props.show_tabs¶
- Name: - show-tabs- Type: - bool- Default Value: - True- Flags: - READABLE,- WRITABLE,- EXPLICIT_NOTIFY- Whether tabs should be shown 
- 
Gtk.Notebook.props.tab_pos¶
- Name: - tab-pos- Type: - Gtk.PositionType- Default Value: - Gtk.PositionType.TOP- Flags: - READABLE,- WRITABLE,- EXPLICIT_NOTIFY- Which side of the notebook holds the tabs 
