1NoteBook(3)           User Contributed Perl Documentation          NoteBook(3)
2
3
4

NAME

6       Tk::NoteBook - display several windows in limited space with notebook
7       metaphor.
8

SYNOPSIS

10         use Tk::NoteBook;
11         ...
12         $w = $frame->NoteBook();
13         $page1 = $w->add("page1", options);
14         $page2 = $w->add("page2", options);
15         ...
16         $page2 = $w->add("page2", options);
17

DESCRIPTION

19       The NoteBook widget provides a notebook metaphor to display several
20       windows in limited space. The notebook is divided into a stack of pages
21       of which only one is displayed at any time. The other pages can be
22       selected by means of choosing the visual "tabs" at the top of the
23       widget. Additionally, the <Tab> key may be used to traverse the pages.
24       If -underline is used, Alt- bindings will also work.
25
26       The widget takes all the options that a Frame does. In addition, it
27       supports the following options:
28
29       -dynamicgeometry
30           If set to false (default and recommended), the size of the NoteBook
31           will match the size of the largest page. Otherwise the size will
32           match the size of the current page causing the NoteBook to change
33           size when different pages of different sizes are selected.
34
35       -ipadx
36           The amount of internal horizontal padding around the pages.
37
38       -ipady
39           The amount of internal vertical padding around the pages.
40
41       -backpagecolor
42           The background color of the tabs and back page.
43
44       -disabledforeground
45           XXX
46
47       -focuscolor
48           The color of the focus border around the tabs.
49
50       -font
51           The font of the tab labels.
52
53       -inactivebackground
54           XXX
55
56       -tabpadx
57           Horizonzal padding around the tab label.
58
59       -tabpady
60           Vertical padding around the tab label.
61

METHODS

63       The following methods may be used with a NoteBook object in addition to
64       standard methods.
65
66       add(pageName, options)
67           Adds a page with name pageName to the notebook. Returns an object
68           of type Frame. The recognized options are:
69
70           -anchor
71               Specifies how the information in a tab is to be displayed. Must
72               be one of n, ne, e, se, s, sw, w, nw or center.
73
74           -bitmap
75               Specifies a bitmap to display on the tab of this page. The
76               bitmap is displayed only if none of the -label or -image
77               options are specified.
78
79           -image
80               Specifies an image to display on the tab of this page. The
81               image is displayed only if the -label option is not specified.
82
83           -label
84               Specifies the text string to display on the tab of this page.
85
86           -justify
87               When there are multiple lines of text displayed in a tab, this
88               option determines the justification of the lines.
89
90           -createcmd
91               Specifies a callback to be called the first time the page is
92               shown on the screen. This option can be used to delay the
93               creation of the contents of a page until necessary. It can be
94               useful in situations where there are a large number of pages in
95               a NoteBook widget; with -createcmd you do not have to make the
96               user wait until all pages are constructed before displaying the
97               first page.
98
99           -raisecmd
100               Specifies a callback to be called whenever this page is raised
101               by the user.
102
103           -state
104               Specifies whether this page can be raised by the user. Must be
105               either normal or disabled.
106
107           -underline
108               Specifies the integer index of a character to underline in the
109               tab. This option is used by the default bindings to implement
110               keyboard traversal for menu buttons and menu entries. 0
111               corresponds to the first character of text displayed on the
112               widget, 1 to the next character and so on.
113
114           -wraplength
115               This option specifies the maximum line length of the label
116               string on this tab. If the line length of the label string
117               exceeds this length, then it is wrapped onto the next line so
118               that no line is longer than the specified length. The value may
119               be specified in any standard forms for screen distances. If
120               this value is less than or equal to 0, then no wrapping is
121               done: lines will break only at newline characters in the text.
122
123       delete(pageName)
124           Deletes the page identified by pageName.
125
126       pagecget(pageName, -option)
127           Returns the current value of the configuration option given by
128           -option in the page given by pageName. Option may have any of the
129           values accepted in the add method.
130
131       pageconfigure(pageName, options)
132           Like configure for the page indicated by pageName. Options may be
133           any of the options accepted by the add method.
134
135       pages
136           Returns a list consisting of the names of all currently defined
137           pages, i.e., those created with the add method.
138
139       page_widget(pageName)
140           Returns the page with name pageName.
141
142       raise(pageName)
143           Raise the page identified by pageName.
144
145       raised()
146           Returns the name of the currently raised page.
147
148       geometryinfo
149           Return the dimensions of the tab area.
150
151       identify(x,y)
152           Identify the tab's page name under the specified coordinates.
153           Return an empty string if there's no tab.
154
155       info("pages")
156           Return a list of all pages.
157
158       info("focus")
159           Return the page name of the tab with the current focus.
160
161       info("focusnext")
162           Return the page name of the tab which would receive the next focus.
163
164       info("focusprev")
165           Return the page name of the tab which had the previous focus.
166
167       info("active")
168           Return the page name of the active tab.
169

BUGS

171       The options "-width" and "-height" do not work.
172

AUTHORS

174       Rajappa Iyer  <rsi@earthling.net> Nick Ing-Simmons
175       <nick@ni-s.u-net.com>
176
177       This code and documentation was derived from NoteBook.tcl in Tix4.0
178       written by Ioi Lam. It may be distributed under the same conditions as
179       Perl itself.
180
181
182
183perl v5.32.0                      2020-07-28                       NoteBook(3)
Impressum