ttk::notebook - Online Linux Manual PageSection : n
Updated : 8.5
Source : Tk
Note : Tk Themed Widget


NAMEttk::notebook − Multi-paned container widget

SYNOPSISttk::notebook pathname ?options...?
pathname add window ?options...? pathname insert index window ?options...?
.\}

DESCRIPTIONA ttk::notebook widget manages a collection of windows and displays a single one at a time. Each slave window is associated with a tab, which the user may select to change the currently-displayed window.

STANDARD OPTIONS−class −cursor −takefocus −style See the ttk_widget manual entry for details on the standard options.

WIDGET-SPECIFIC OPTIONS [ −height height ] If present and greater than zero, specifies the desired height of the pane area (not including internal padding or tabs). Otherwise, the maximum height of all panes is used. [ −padding padding ] Specifies the amount of extra space to add around the outside of the notebook. The padding is a list of up to four length specifications left top right bottom. If fewer than four elements are specified, bottom defaults to top, right defaults to left, and top defaults to left. In other words, a list of three numbers specify the left, vertical, and right padding; a list of two numbers specify the horizontal and the vertical padding; a single number specifies the same padding all the way around the widget. [ −width width ] If present and greater than zero, specifies the desired width of the pane area (not including internal padding). Otherwise, the maximum width of all panes is used.

TAB OPTIONSThe following options may be specified for individual notebook panes: [ −state state ] Either normal, disabled or hidden. If disabled, then the tab is not selectable. If hidden, then the tab is not shown. [ −sticky sticky ] Specifies how the slave window is positioned within the pane area. Value is a string containing zero or more of the characters n, s, e, or w. Each letter refers to a side (north, south, east, or west) that the slave window will stick to, as per the grid geometry manager. [ −padding padding ] Specifies the amount of extra space to add between the notebook and this pane. Syntax is the same as for the widget −padding option. [ −text text ] Specifies a string to be displayed in the tab. [ −image image ] Specifies an image to display in the tab. See ttk_widget(n) for details. [ −compound compound ] Specifies how to display the image relative to the text, in the case both −text and −image are present. See label(n) for legal values. [ −underline underline ] Specifies the integer index (0-based) of a character to underline in the text string. The underlined character is used for mnemonic activation if ttk::notebook::enableTraversal is called.

TAB IDENTIFIERSThe tabid argument to the following commands may take any of the following forms: • An integer between zero and the number of tabs; • The name of a slave window; • A positional specification of the form @x,y, which identifies the tab • The literal string current, which identifies the currently-selected tab; or: • The literal string end, which returns the number of tabs (only valid for pathname index).

WIDGET COMMANDpathname add window ?options...?  Adds a new tab to the notebook. See TAB OPTIONS for the list of available options. If window is currently managed by the notebook but hidden, it is restored to its previous position. pathname configure ?options?  See ttk::widget(n). pathname cget option  See ttk::widget(n). pathname forget tabid  Removes the tab specified by tabid, unmaps and unmanages the associated window. pathname hide tabid  Hides the tab specified by tabid. The tab will not be displayed, but the associated window remains managed by the notebook and its configuration remembered. Hidden tabs may be restored with the add command. pathname identify component x y  Returns the name of the element under the point given by x and y, or the empty string if no component is present at that location. The following subcommands are supported: pathname identify element x y  Returns the name of the element at the specified location. pathname identify tab x y  Returns the index of the tab at the specified location. pathname index tabid  Returns the numeric index of the tab specified by tabid, or the total number of tabs if tabid is the string end. pathname insert pos subwindow options...  Inserts a pane at the specified position. pos is either the string end, an integer index, or the name of a managed subwindow. If subwindow is already managed by the notebook, moves it to the specified position. See TAB OPTIONS for the list of available options. pathname instate statespec ?script...?  See ttk::widget(n). pathname select ?tabid?  Selects the specified tab. The associated slave window will be displayed, and the previously-selected window (if different) is unmapped. If tabid is omitted, returns the widget name of the currently selected pane. pathname state ?statespec?  See ttk::widget(n). pathname tab tabid ?−option ?value ...  Query or modify the options of the specific tab. If no −option is specified, returns a dictionary of the tab option values. If one −option is specified, returns the value of that option. Otherwise, sets the −options to the corresponding values. See TAB OPTIONS for the available options. pathname tabs  Returns the list of windows managed by the notebook, in the index order of their associated tabs.

KEYBOARD TRAVERSALTo enable keyboard traversal for a toplevel window containing a notebook widget $nb, call: ttk::notebook::enableTraversal $nb This will extend the bindings for the toplevel window containing the notebook as follows: • Control-Tab selects the tab following the currently selected one. • Control-Shift-Tab selects the tab preceding the currently selected one. • Alt-K, where K is the mnemonic (underlined) character of any tab, will select that tab. Multiple notebooks in a single toplevel may be enabled for traversal, including nested notebooks. However, notebook traversal only works properly if all panes are direct children of the notebook.

VIRTUAL EVENTSThe notebook widget generates a <<NotebookTabChanged>> virtual event after a new tab is selected.

EXAMPLEpack [ttk::notebook .nb] ​.nb add [frame .nb.f1] −text "First tab" ​.nb add [frame .nb.f2] −text "Second tab" ​.nb select .nb.f2 ttk::notebook::enableTraversal .nb

STYLING OPTIONSThe class name for a ttk::notebook is TNotebook. The tab has a class name of TNotebook.Tab Dynamic states: active, disabled, selected. TNotebook styling options configurable with ttk::style are: −background color
−bordercolor color
−darkcolor color
−foreground color
−lightcolor color
−padding padding
−tabmargins padding
−tabposition side
TNotebook.Tab styling options configurable with ttk::style are: −background color
−bordercolor color
−compound compound
−expand padding
Defines how much the tab grows in size. Usually used with the selected dynamic state. −tabmargins should be set appropriately so that there is room for the tab growth. −font font
−foreground color
−padding padding
Some options are only available for specific themes. See the ttk::style manual page for information on how to configure ttk styles.

SEE ALSOttk::widget(n), grid(n)

KEYWORDSpane, tab
0
Johanes Gumabo
Data Size   :   34,308 byte
man-ttk_notebook.nBuild   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 184,285
Visitor ID   :     :  
Visitor IP   :   18.117.168.40   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (rof_escape_sequence_block|26|(null)|(null)|-1|139)         (parse_manual_page_|249|ttk_notebook.n|285/139|══─}─══|.══─}─══ )         (htmlprn|149|ttk_notebook.n|285/139|.══─}─══|.══─}─══ )         (rof_escape_sequence|91|ttk_notebook.n|285/140|\}|.\} )         (parse_manual_page_|249|ttk_notebook.n|285/140|\}|.\} )         (rof_OP|10|ttk_notebook.n|296|4|.OP \-height height Height )         (rof_OP|10|ttk_notebook.n|301|4|.OP \-padding padding Padding )         (rof_OP|10|ttk_notebook.n|313|4|.OP \-width width Width )         (rof_OP|10|ttk_notebook.n|320|4|.OP \-state state State )         (rof_OP|10|ttk_notebook.n|324|4|.OP \-sticky sticky Sticky )         (rof_OP|10|ttk_notebook.n|332|4|.OP \-padding padding Padding )         (rof_OP|10|ttk_notebook.n|335|4|.OP \-text text Text )         (rof_OP|10|ttk_notebook.n|337|4|.OP \-image image Image )         (rof_OP|10|ttk_notebook.n|340|4|.OP \-compound compound Compound )         (rof_OP|10|ttk_notebook.n|344|4|.OP \-underline underline Underline )