=head1 NAME Tk::NoteBook - display several windows in limited space with notebook metaphor. =for pm Tixish/NoteBook.pm =for category Tix Extensions =head1 SYNOPSIS use Tk::NoteBook; ... $w = $frame->NoteBook(); $page1 = $w->add("page1", options); $page2 = $w->add("page2", options); ... $page2 = $w->add("page2", options); =head1 DESCRIPTION The NoteBook widget provides a notebook metaphor to display several windows in limited space. The notebook is divided into a stack of pages of which only one is displayed at any time. The other pages can be selected by means of choosing the visual "tabs" at the top of the widget. Additionally, the key may be used to traverse the pages. If B<-underline> is used, Alt- bindings will also work. The widget takes all the options that a Frame does. In addition, it supports the following options: =over 4 =item B<-dynamicgeometry> If set to false (default and recommended), the size of the NoteBook will match the size of the largest page. Otherwise the size will match the size of the current page causing the NoteBook to change size when different pages of different sizes are selected. =item B<-ipadx> The amount of internal horizontal padding around the pages. =item B<-ipady> The amount of internal vertical padding around the pages. =back =head1 METHODS The following methods may be used with a NoteBook object in addition to standard methods. =over 4 =item BI, IB<)> Adds a page with name I to the notebook. Returns an object of type B. The recognized I are: =over 4 =item B<-anchor> Specifies how the information in a tab is to be displayed. Must be one of B, B, B, B, B, B, B, B or B
. =item B<-bitmap> Specifies a bitmap to display on the tab of this page. The bitmap is displayed only if none of the B<-label> or B<-image> options are specified. =item B<-image> Specifies an image to display on the tab of this page. The image is displayed only if the B<-label> option is not specified. =item B<-label> Specifies the text string to display on the tab of this page. =item B<-justify> When there are multiple lines of text displayed in a tab, this option determines the justification of the lines. =item B<-createcmd> Specifies a L to be called the first time the page is shown on the screen. This option can be used to delay the creation of the contents of a page until necessary. It can be useful in situations where there are a large number of pages in a NoteBook widget; with B<-createcmd> you do not have to make the user wait until all pages are constructed before displaying the first page. =item B<-raisecmd> Specifies a L to be called whenever this page is raised by the user. =item B<-state> Specifies whether this page can be raised by the user. Must be either B or B. =item B<-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 text displayed on the widget, 1 to the next character and so on. =item B<-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, then it is wrapped onto the next line so that no line is longer than the specified length. The value may be specified in any 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. =back =item BIB<)> Deletes the page identified by I. =item BI, I<-option>B<)> Returns the current value of the configuration option given by I<-option> in the page given by I. I