NAME

notebook -
Multi-paned container widget

SYNOPSIS

notebook pathName ?options?

DESCRIPTION

A notebook widget manages a collection of subpanes and displays a single one at a time. Each pane is associated with a tab, which the user may select to change the currently-displayed pane.

STANDARD OPTIONS

OPTIONS

NameDatabase nameDatabase class
-heightheightHeight
 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.
-paddingpaddingPadding
 Specifies the amount of extra space to allocate for the widget. 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.
-widthwidthWidth
 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.

WIDGET COMMAND

pathname add child ?options...?
Adds a new tab to the notebook. When the tab is selected, the child window will be displayed. child must be a direct child of the notebook window. See TAB OPTIONS below for the list of available options.
pathname configure ?options?
See widget(n).
pathname cget option
See widget(n).
pathname forget index
Removes the tab specified by index, unmap and unmanage the associated child window.
pathname index index
Returns the numeric index of the tab specified by index, or the total number of tabs if index is the string "end".
pathname instate args...?
See widget(n).
pathname select index
Selects the specified tab; the associated child pane will be displayed, and the previously-selected pane (if different) is unmapped.
pathname state ?statespec?
See widget(n).
pathname tabcget index -option
Retrieve the value of the specified tab option.
pathname tabconfigure index ?options...
Query or modify the options of the specific tab, Behaviour is the same as the standard widget configure command. See TAB OPTIONS for the available options.
pathname tabs
Returns a list of all pane windows managed by the widget.

KEYBOARD TRAVERSAL

To enable keyboard traversal for a dialog box containing a notebook widget $nb, call:

tile::notebook::enableTraversal $nb

This will extend the bindings for the toplevel widget containing the notebook as follows:

TAB INDICES

The index argument to the above commands may take any of the following forms:

TAB OPTIONS

NameDatabase nameDatabase class
-stickystickySticky
 Specifies how the child pane 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 child window will "stick" to, as per the grid geometry manager.
-texttextText
 Specifies a string to be displayed in the tab.
-imageimageImage
 Specifies an image to display in the tab, which must have been created with the image create command.
-compoundcompoundCompound
 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.
-underlineunderlineUnderline
 Specifies the integer index (0-based) of a character to underline in the text string. The underlined character is used for mnemonic activation if tile::enableNotebookTraversal is called.

EXAMPLE

notebook .nb
.nb add [frame .nb.f1] -text "First tab"
.nb add [frame .nb.f2] -text "Second tab"
.nb select .nb.f2
tile::enableNotebookTraversal .nb

SEE ALSO

widget(n), grid(n)

KEYWORDS

pane, tab