The tixNoteBook command creates a new Tcl command whose name is the same as the path name of the NoteBook
widget's window. This command may be used to invoke various operations on the widget. It has the
following general form:
pathNameoption ?argarg...?
PathName is the name of the command, which is the same as the NoteBook widget's path name. Option and the
args determine the exact behavior of the command. The following commands are possible for NoteBook
widgets:
pathNameaddpageName ?optionvalue...?
Adds a new notebook page subwidget into the NoteBook widget. Additional parameters may be
supplied to configure this page subwidget. Possible options are:
-anchor
Specifies how the information in a tab (e.g. text or a bitmap) is to be displayed in the
widget. Must be one of the values n, ne, e, se, s, sw, w, nw, or center. For example, nw
means display the information such that its top-left corner is at the top-left corner of
the widget.
-bitmap
Specifies a bitmap to display on the tab of this page. The bitmap is displayed only if none
of the -label or -image options are specified.
-createcmd
Specifies a TCL command to be called the first time a page is shown on the screen. This
option can be used to delay the creation of the contents of a page until necessary.
Therefore, it can be used to speed up interface creation process especially when there are
a large number of pages in a NoteBook widget.
-image Specifies an image to display on the tab of this page. The image is displayed only if the
-label options is not specified.
-justify
When there are multiple lines of text displayed in a tab, this option determines how the
lines line up with each other. Must be one of left, center, or right. Left means that the
lines' left edges all line up, center means that the lines' centers are aligned, and right
means that the lines' right edges line up.
-label Specifies a text label string to display on the tab of this page subwidget.
-raisecmd
Specifies a TCL command to be called whenever this page is raised by the user.
-state Specifies whether this page can be raised by the user. Must be either normal or disabled.
-underline
Specifies the integer index of a character to underline in the tab. This option is used by
the default bindings to implement keyboard traversal for menu buttons and menu entries. 0
corresponds to the first character of the text displayed in the widget, 1 to the next
character, and so on.
-wraplength
This option specifies the maximum line length of the label string on this tab. If the line
length of the label string exceeds this length, it is wrapped onto the next line, so that
no line is longer than the specified length. The value may be specified in any of the
standard forms for screen distances. If this value is less than or equal to 0 then no
wrapping is done: lines will break only at newline characters in the text.
pathNamecgetoption
Returns the current value of the configuration option given by option.Option may have any of the
values accepted by the tixNoteBook command.
pathNameconfigure ?option? ?valueoptionvalue...?
Query or modify the configuration options of the widget. If no option is specified, returns a
list describing all of the available options for pathName (see Tk_ConfigureInfo for information on
the format of this list). If option is specified with no value, then the command returns a list
describing the one named option (this list will be identical to the corresponding sublist of the
value returned if no option is specified). If one or more option-value pairs are specified, then
the command modifies the given widget option(s) to have the given value(s); in this case the
command returns an empty string. Option may have any of the values accepted by the tixNoteBook
command.
pathNamedeletepageName?
Deletes the page identified by pageName.
pathNamepagecgetpageNameoption
Returns the current value of the configuration option given by option in the page given by
pageName. Option may have any of the values accepted by the add widget command.
pathNamepageconfigurepageName ?option? ?value...?
When no option is given, prints out the values of all options of this page. If option is specified
with no value, then the command returns the current value of that option. If one or more
option-value pairs are specified, then the command modifies the given page's option(s) to have the
given value(s); in this case the command returns an empty string. Option may be any of options
accepted by the add widget command.
pathNamepages
Returns a list of the names of all the pages.
pathNameraisepageName
Raise the page identified by pageName.
pathNameraised
Returns the name of the currently raised page.
pathNamesubwidgetname?args?
When no options are given, this command returns the pathname of the subwidget of the specified
name.
When options are given, the widget command of the specified subwidget will be called with these
options.