OSDN Git Service

Please enter the commit message for your changes. Lines starting
[eos/base.git] / util / src / TclTk / blt2.5 / man / tabset.mann
1 '\"
2 '\" Copyright 1998 by Bell Labs Innovations for Lucent Technologies.
3 '\"
4 '\" Permission to use, copy, modify, and distribute this software and its
5 '\" documentation for any purpose and without fee is hereby granted, provided
6 '\" that the above copyright notice appear in all copies and that both that the
7 '\" copyright notice and warranty disclaimer appear in supporting documentation,
8 '\" and that the names of Lucent Technologies any of their entities not be used
9 '\" in advertising or publicity pertaining to distribution of the software
10 '\" without specific, written prior permission.
11 '\"
12 '\" Lucent Technologies disclaims all warranties with regard to this software,
13 '\" including all implied warranties of merchantability and fitness.  In no event
14 '\" shall Lucent Technologies be liable for any special, indirect or
15 '\" consequential damages or any damages whatsoever resulting from loss of use,
16 '\" data or profits, whether in an action of contract, negligence or other
17 '\" tortuous action, arising out of or in connection with the use or performance
18 '\" of this software.  
19 '\"
20 '\" Tabset widget created by George Howlett.
21 '\"
22 .so man.macros
23 .TH tabset n BLT_VERSION BLT "BLT Built-In Commands"
24 .BS
25 '\" Note:  do not modify the .SH NAME line immediately below!
26 .SH NAME
27 tabset \- Create and manipulate tabset widgets
28 .BE
29 .SH SYNOPSIS
30 \fBtabset\fR \fIpathName \fR?\fIoptions\fR?
31 .SH DESCRIPTION
32 The \fBtabset\fR widget displays a series of overlapping folders. Only
33 the contents of one folder at a time is displayed.  By clicking on the
34 tab's of a folder, you can view other folders.  Each folder may
35 contain any Tk widget that can be automatically positioned and resized
36 in the folder.
37 .PP
38 There's no limit to the number of folders.  Tabs can be tiered or
39 scrolled.  Pages (i.e. embedded widgets) can be torn off and displayed
40 in another toplevel widget, and also restored.  A tabset can also be
41 used as just a set of tabs, without a displaying any pages.  You can
42 bind events to individual tabs, so it's easy to add features like
43 "balloon help".
44 .SH INTRODUCTION
45 Notebooks are a popular graphical paradigm.  They allow you to organize
46 several windows that are too big to display at the same time as 
47 pages of a notebook.  For example, your application may display several 
48 X-Y graphs at the same time.  The graphs are too big to pack into the 
49 same frame.  Managing them in several \fBtoplevel\fR widgets is
50 also cumbersome and clutters the screen.  Instead, the \fBtabset\fR widget 
51 organizes the graphs as folders in a notebook.  
52 .PP
53 Only one page is visible at a time. When you click on a tab, 
54 the folder corresponding to the tab is displayed in the  \fBtabset\fR 
55 widget.  The tabset also lets you temporarily tear pages 
56 out of the notebook into a separate toplevel widget, and put them back 
57 in the tabset later.  For example, you could compare two graphs side-by-side 
58 by tearing them out, and then replace them when you are finished.
59 .PP
60 A tabset can contain any number of folders.  If there are too
61 many tabs to view, you can arrange them as multiple tiers or scroll
62 the tabs. You can also attach Tk scrollbars to the tabset to scroll the tabs.
63 .SH SYNTAX
64 The \fBtabset\fR command creates a new window using the \fIpathName\fR
65 argument and makes it into a tabset widget.
66 .DS
67 \fBtabset \fIpathName \fR?\fIoption value\fR?...
68 .DE
69 Additional options may be specified on the command line or in the
70 option database to configure aspects of the tabset such as its colors,
71 font, text, and relief.  The \fBtabset\fR command returns its
72 \fIpathName\fR argument.  At the time this command is invoked, there
73 must not exist a window named \fIpathName\fR, but \fIpathName\fR's
74 parent must exist.
75 .PP
76 When first created, a new tabset contains no tabs.  Tabs are added or
77 deleted using widget operations described below. It is not necessary
78 for all the tabs to be displayed in the tabset window at once;
79 commands described below may be used to change the view in the window.
80 Tabsets allow scrolling of tabs using the \fB\-scrollcommand\fR
81 option.  They also support scanning (see the \fBscan\fR operation).
82 Tabs may be arranged along any side of the tabset window using the
83 \fB\-side\fR option.
84 .PP
85 The size of the tabset window is determined the number of tiers of
86 tabs and the sizes of the Tk widgets embedded inside each folder.
87 The widest widget determines the width of the folder. The tallest
88 determines the height.  If no folders contain an embedded widget, the
89 size is detemined solely by the size of the tabs.  
90 .PP
91 You can override either dimension with the tabset's \fB\-width\fR
92 and \fB\-height\fR options.
93 .SH "INDICES"
94 Indices refer to individual tabs/folders in the tabset.  Many of
95 the operations for tabset widgets take one or more indices as
96 arguments.  An index may take several forms:
97 .TP 12
98 \fInumber\fR 
99 Unique index offset of the tab.
100 .TP 12
101 \fB@\fIx\fB,\fIy\fR
102 Tab that covers the point in the tabset window
103 specified by \fIx\fR and \fIy\fR (in screen coordinates).  If no
104 tab covers that point, then the index is ignored.
105 .TP 12
106 \fBselect\fR 
107 The currently selected tab.  The \fBselect\fR index is 
108 typically changed by either clicking on the tab with the left mouse 
109 button or using the widget's \fBinvoke\fR operation.
110 .TP 12
111 \fBactive\fR 
112 The tab where the mouse pointer is currently located.  The label 
113 is drawn using its active colors (see the \fB\-activebackground\fR and
114 \fB\-activeforeground\fR options).  The \fBactive\fR index is typically
115 changed by moving the mouse pointer over a tab or using the widget's
116 \fBactivate\fR operation. There can be only one active tab at a time.
117 If there is no tab located under the mouse pointer, the index
118 is ignored.
119 .TP 12
120 \fBbegin\fR
121 First tab in the tabset.  If there are no tabs in the tabset then the
122 index is ignored.
123 .TP 12
124 \fBcurrent\fR 
125 Tab that is currently being operated upon.  Used within bindings.
126 .TP 12
127 \fBfocus\fR 
128 Tab that currently has the widget's focus.
129 This tab is displayed with a dashed line around its label.  You can
130 change this using the \fBfocus\fR operation. If no tab has focus,
131 then the index is ignored.
132 .TP 12
133 \fBdown\fR 
134 Tab immediately below the tab that currently has focus,
135 if there is one. If there is no tab below, the current 
136 tab is returned.
137 .TP 12
138 \fBleft\fR
139 Tab immediately to the left the tab that currently has focus,
140 if there is one.  If there is no tab to the left, the current 
141 tab is returned.
142 .TP 12
143 \fBnext\fR 
144 The next tab.  Wraps to the first tab if at end.
145 .TP 12
146 \fBprev\fR 
147 The previous tab.  Wraps to the last tab if at start.
148 .TP 12
149 \fBright\fR 
150 Tab immediately to the right the tab that currently has focus, if
151 there is one. If there is no tab to the right, the current tab is
152 returned.
153 .TP 12
154 \fBup\fR 
155 Tab immediately above, if there is one, to the tab that currently has
156 focus. If there is no tab above, the current tab is returned.
157 .TP 12
158 \fBend\fR
159 Last tab in the tabset.  If there are no tabs in the tabset then the
160 index is ignored.
161 .LP
162 Some indices may not always be available.  For example, if the mouse
163 is not over any tab, "active" does not have an index.  For most
164 tabset operations this is harmless and ignored.  
165 .SH "OPERATIONS"
166 All \fBtabset\fR operations are invoked by specifying the widget's
167 pathname, the operation, and any arguments that pertain to that
168 operation.  The general form is:
169 .sp
170 .DS
171         \fIpathName operation \fR?\fIarg arg ...\fR?
172 .DE
173 .sp
174 \fIOperation\fR and the \fIarg\fRs determine the exact behavior of the
175 command.  The following operations are available for tabset widgets:
176 .TP
177 \fIpathName \fBactivate\fR \fIindex\fR 
178 Sets the active tab to the one indicated by \fIindex\fR.  The
179 active tab is drawn with its \fIactive\fR colors (see the
180 \fB\-activebackground\fR and \fB\-activeforeground\fR options) and may
181 be retrieved with the index \fBactive\fR.  Only one tab may be active
182 at a time.  If \fIindex\fR is the empty string, then all tabs will
183 be drawn with their normal foreground and background colors.
184 .TP
185 \fIpathName \fBbind\fR \fItagName\fR ?\fIsequence\fR? ?\fIcommand\fR? 
186 Associates \fIcommand\fR with \fItagName\fR such that whenever the
187 event sequence given by \fIsequence\fR occurs for a tab with this
188 tag, \fIcommand\fR will be invoked.  The syntax is similar to the 
189 \fBbind\fR command except that it operates on tabs, rather 
190 than widgets.  The tagName is one of \fBall\fR, \fBPerforation\fR,
191 \fBImage\fR, \fBLeftimage\fR, \fBStartimage\fR, \fBEndimage\fR,
192 or the name label used to create a Tab.
193 See the \fBbind\fR manual entry for
194 complete details on \fIsequence\fR and the substitutions performed on 
195 \fIcommand\fR.  
196 .sp
197 If all arguments are specified then a new binding is created, replacing 
198 any existing binding for the same \fIsequence\fR and \fItagName\fR.
199 If the first character of \fIcommand\fR is \fB+\fR then \fIcommand\fR 
200 augments an existing binding rather than replacing it. 
201 If no \fIcommand\fR argument is provided then the command currently
202 associated with \fItagName\fR and \fIsequence\fR (it's an error occurs 
203 if there's no such binding) is returned.  If both \fIcommand\fR and 
204 \fIsequence\fR are missing then a list of all the event sequences for 
205 which bindings have been defined for \fItagName\fR. 
206 .TP
207 \fIpathName \fBcget\fR \fIoption\fR
208 Returns the current value of the configuration option given
209 by \fIoption\fR.
210 \fIOption\fR may have any of the values accepted by the \fBconfigure\fR
211 operation described in the section
212 .SB "WIDGET OPTIONS" 
213 below.
214 .TP
215 \fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
216 Query or modify the configuration options of the widget.
217 If no \fIoption\fR is specified, returns a list describing all 
218 the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
219 information on the format of this list).  If \fIoption\fR is specified
220 with no \fIvalue\fR, then the command returns a list describing the
221 one named option (this list will be identical to the corresponding
222 sublist of the value returned if no \fIoption\fR is specified).  If
223 one or more \fIoption\-value\fR pairs are specified, then the command
224 modifies the given widget option(s) to have the given value(s);  in
225 this case the command returns an empty string.
226 \fIOption\fR and \fIvalue\fR are described in the section
227 .SB "WIDGET OPTIONS" 
228 below.
229 .TP
230 \fIpathName \fBcoords\fR \fIelement\fR ?\fIindex\fR?
231 Returns the screen coordinates for the given \fIelement\fR,
232 which is one of: \fBtext\fR,
233 \fBimage\fR, \fBleftimage\fR, \fBstartimage\fR, \fBendimage\fR, or
234 \fBperforation\fR.
235 All except \fBstartimage\fR and \fBendimage\fR must also
236 provide a tab \fIindex\fR.
237 .TP
238 \fIpathName \fBdelete \fIfirst \fR?\fIlast\fR?
239 Deletes one or more tabs from the tabset.  \fIFirst\fR and \fIlast\fR
240 are the first and last indices, defining a range of tabs to be deleted.  
241 If \fIlast\fR isn't specified, then only the tab at \fIfirst\fR 
242 is deleted.
243 .TP
244 \fIpathName \fBfocus \fIindex\fR
245 Designates a tab to get the widget's focus.  This tab is displayed 
246 with a dashed line around its label. 
247 .TP
248 \fIpathName \fBget\fR \fIindex\fR
249 Returns the name of the tab.  The value of \fIindex\fR may
250 be in any form described in the section
251 .SB "INDICES".
252 .TP
253 \fIpathName \fBhightlight\fR \fIindex\fR
254 Highlight a tab.
255 .TP
256 \fIpathName \fBindex\fR ?\fIflag\fR? \fIstring\fR 
257 Returns the index offset of the tab specified by \fIstring\fR.  If
258 \fIflag\fR is \fB\-name\fR, then \fIstring\fR is the name of a tab.
259 If \fIflag\fR is \fB\-index\fR, \fIstring\fR is an index such as
260 "active" or "focus".
261 If \fIflag\fR is \fB\-both\fR, \fIstring\fR is either.
262 If \fIflag\fR isn't specified, it defaults to
263 \fB\-index\fR.
264 .TP
265 \fIpathName \fBinsert\fR \fIposition ?\fIname ...\fR? ?\fIoption value\fR?...
266 Inserts new tabs into the tabset.  Tabs are inserted just before the
267 tab given by \fIposition\fR.  \fIPosition\fR may be either a number,
268 indicating where in the list the new tab should be added, or \fBend\fR,
269 indicating that the new tab is to be added the end of the list.  
270 \fIName\fR is the symbolic name of the tab. \fIBe careful not to use 
271 a number. Otherwise the tabset will confuse it with tab indices\fR.  Returns 
272 a list of indices for all the new tabs.  If tab name is an empty
273 string, or ends in #auto, it is
274 generated using the given prefix.  The list
275 of created tab names is returned.
276 .TP
277 \fIpathName \fBinvoke \fIindex\fR
278 Selects the tab given by \fIindex\fR, maps the tab's embedded widget, and 
279 invokes the Tcl command associated with the tab, if  there  is  one.  
280 The return value is the return value from the Tcl command, or an empty
281 string  if there  is  no  command  associated with the tab.
282 This command is ignored if the  tab's state (see the \fB\-state\fR option)
283 is disabled.
284 .TP
285 \fIpathName \fBmove\fR \fIindex\fR \fBbefore\fR|\fBafter\fR \fIindex\fR
286 Moves the tab \fIindex\fR to a new position in the tabset.
287 .TP
288 \fIpathName \fBnearest\fR \fIx\fR \fIy\fR ?\fIvarName\fR? ?\fIcoordsVar\fR?
289 Returns the name of the tab nearest to given X-Y screen coordinate.
290 If the argument \fIvarName\fR is present,
291 this is a Tcl variable that is set to either \fBtext\fR,
292 \fBimage\fR, \fBleftimage\fR, \fBstartimage\fR, \fBendimage\fR,
293 \fBperforation\fR or the empty string depending
294 what part of the
295 tab the coordinate is over.
296 If the argument \fIcoordsVar\fR is present,
297 return the bounding box coordinates coordinates for the matching item
298 set in \fIvarName\fR.
299 .TP
300 \fIpathName \fBperforation \fIoperation\fR ?\fIargs\fR?
301 This operation controls the perforation on the tab label.
302 .RS
303 .TP
304 \fIpathName \fBperforation activate\fR \fIboolean\fR
305 Set perforation active state to on or off.
306 .TP
307 \fIpathName \fBperforation invoke\fR
308 Invokes the command specified for perforations (see the 
309 \fB\-perforationcommand\fR widget option). Typically this command
310 places the page into a top level widget. The name of the toplevel
311 is the concatonation of the \fIpathName\fR, "-",  and the \fItabName\fR.
312 The return value is the return value from the Tcl command, or an empty
313 string  if there  is  no  command  associated with the tab.
314 This command is ignored if the  tab's state (see the \fB\-state\fR option)
315 is disabled.
316 .RE
317 .TP
318 \fIpathName \fBscan\fR \fIoption args\fR
319 This command implements scanning on tabsets.  It has
320 two forms, depending on \fIoption\fR:
321 .RS
322 .TP
323 \fIpathName \fBscan mark \fIx y\fR
324 Records \fIx\fR and \fIy\fR and the current view in the tabset
325 window;  used with later \fBscan dragto\fR commands.
326 Typically this command is associated with a mouse button press in
327 the widget.  It returns an empty string.
328 .TP
329 \fIpathName \fBscan dragto \fIx y\fR.
330 This command computes the difference between its \fIx\fR and \fIy\fR
331 arguments and the \fIx\fR and \fIy\fR arguments to the last
332 \fBscan mark\fR command for the widget.
333 It then adjusts the view by 10 times the
334 difference in coordinates.  This command is typically associated
335 with mouse motion events in the widget, to produce the effect of
336 dragging the list at high speed through the window.  The return
337 value is an empty string.
338 .RE
339 .TP
340 \fIpathName \fBsee \fIindex\fR 
341 Scrolls the tabset so that the tab
342 \fIindex\fR is visible in the widget's window.
343 .TP
344 \fIpathName \fBselect \fIindex\fR 
345 Select the tab.
346 .TP
347 \fIpathName \fBsize\fR
348 Returns the number of tabs in the tabset.
349 .TP
350 \fIpathName \fBtab \fIoperation\fR ?\fIargs\fR?
351 .RS
352 .TP
353 \fIpathName \fBtab cget\fR \fInameOrIndex\fR \fIoption\fR
354 Returns the current value of the configuration option given
355 by \fIoption\fR.
356 \fIOption\fR may have any of the values accepted by the \fBtab configure\fR
357 operation described in the section 
358 .SB "TAB OPTIONS"
359 below.
360 .TP
361 \fIpathName \fBtab configure\fR \fInameOrIndex\fR ?\fInameOrIndex\fR...? \fIoption\fR? ?\fIvalue option value ...\fR?
362 Query or modify the configuration options of one or more tabs.
363 If no \fIoption\fR is specified, this operation returns a list 
364 describing all the available options for \fInameOrIndex\fR.  
365 \fINameOrIndex\fR can be either the name of a tab or its index.  Names
366 of tabs take precedence over their indices.  That means a tab named 
367 \fIfocus\fR is picked over the "focus" tab.
368 .sp
369 If \fIoption\fR is specified, but not \fIvalue\fR, then a list describing the
370 one named option is returned.  If  one or more \fIoption\-value\fR pairs 
371 are specified, then each named tab (specified by \fInameOrIndex\fR) will
372 have its configurations option(s) set the given value(s).  In
373 this last case, the empty string is returned.
374 \fIOption\fR and \fIvalue\fR are described in the section 
375 .SB "TAB OPTIONS"
376 below.
377 .TP
378 \fIpathName \fBtab dockall\fR
379 Dock all tearoffs.
380 .TP
381 \fIpathName \fBtab names\fR ?\fIpattern\fR?
382 Returns the names of all the tabs matching the given pattern. If
383 no \fIpattern\fR argument is provided, then all tab names are returned.
384 .TP
385 \fIpathName \fBtab pageheight\fR
386 .TP
387 \fIpathName \fBtab pagewidth\fR
388 .TP
389 \fIpathName \fBtab select \fInameOrindex\fR
390 Select a tab by name or index, and cause it to become visible, selected,
391 activated, and receive focus.  This is a shortform for using separate
392 commands.
393 .TP
394 \fIpathName \fBtab tearoff\fR ?\fIindex\fR?
395 With no  ?\fIindex\fR?, returns list of all torn-off tabs.
396 Otherwise, return the window for the given torn-off tab.
397 .RE
398 .TP
399 \fIpathName \fBtab tearoff\fR ?\fIindex\fR?
400 With no  ?\fIindex\fR?, returns list of all torn-off tabs.
401 Otherwise, toggles the torn-off state of the tab.
402 .TP
403 \fIpathName \fBview \fIargs\fR
404 This command queries or changes the position of the
405 tabset in the widget's window.  It can take any of the following
406 forms:
407 .RS
408 .TP
409 \fIpathName \fBview\fR 
410 Returns a list of two numbers between 0.0 and
411 1.0 that describe the amount and position of the tabset that is
412 visible in the window.  For example, if \fIview\fR is "0.2 0.6", 20%
413 of the tabset's text is off-screen to the left, 40% is visible in the
414 window, and 40% of the tabset is off-screen to the right.  These are
415 the same values passed to scrollbars via the \fB\-scrollcommand\fR
416 option.
417 .TP
418 \fIpathName \fBview moveto\fI fraction\fR
419 Adjusts the view in the window so that \fIfraction\fR of the
420 total width of the tabset text is off-screen to the left.
421 \fIfraction\fR must be a number between 0.0 and 1.0.
422 .TP
423 \fIpathName \fBview scroll \fInumber what\fR 
424 This command shifts the view in the window (left/top or right/bottom)
425 according to \fInumber\fR and \fIwhat\fR.  \fINumber\fR must be an
426 integer. \fIWhat\fR must be either \fBunits\fR or \fBpages\fR or an
427 abbreviation of these.  If \fIwhat\fR is \fBunits\fR, the view adjusts
428 left or right by \fInumber\fR scroll units (see the
429 \fB\-scrollincrement\fR option).  ; if it is \fBpages\fR then the view
430 adjusts by \fInumber\fR widget windows.  If \fInumber\fR is negative
431 then tabs farther to the left become visible; if it is positive then
432 tabs farther to the right become visible.
433 .RE
434 .SH "WIDGET OPTIONS"
435 Widget configuration options may be set either by the \fBconfigure\fR 
436 operation or the Tk \fBoption\fR command.  The resource class
437 is \fBTabset\fR.  The resource name is the name of the widget.
438 .CS
439 option add *Tabset.Foreground white
440 option add *Tabset.Background blue
441 .CE
442 The following widget options are available:
443 .TP
444 \fB\-activebackground \fIcolor\fR
445 Sets the default active background color for tabs.  A tab is active
446 when the mouse is positioned over it or set by the \fBactivate\fR
447 operation.  Individual tabs may override this option by setting the 
448 tab's \fB\-activebackground\fR option. 
449 .TP
450 \fB\-activeforeground \fIcolor\fR
451 Sets the default active foreground color for tabs.  A tab is active
452 when the mouse is positioned over it or set by the \fBactivate\fR
453 operation.  Individual tabs may override this option by setting the
454 tab's \fB\-activeforeground\fR option.
455 .TP
456 \fB\-anchor \fIanchor\fR 
457 Anchors the tab's text (and images) to a particular edge of the tab.
458 The default value is \fBcenter\fR.
459 .TP
460 \fB\-background \fIcolor\fR
461 Sets the background color of the tabset.  
462 .TP
463 \fB\-borderwidth \fIpixels\fR
464 Sets the width of the 3\-D border around the outside edge of the widget.  The
465 \fB\-relief\fR option determines how the border is to be drawn.  The
466 default is \fB2\fR.
467 .TP
468 \fB\-cursor \fIcursor\fR
469 Specifies the widget's cursor.  The default cursor is \fB""\fR.
470 .TP
471 \fB\-dashes \fIdashList\fR
472 Sets the dash style of the focus outline.  When a tab has the widget's
473 focus, it is drawn with a dashed outline around its label.  
474 \fIDashList\fR is a list of up
475 to 11 numbers that alternately represent the lengths of the dashes
476 and gaps on the cross hair lines.  Each number must be between 1 and
477 255.  If \fIdashList\fR is \fB""\fR, the outline will be a solid
478 line.  The default value is \fB5 2\fR.
479 .TP 
480 \fB\-ellipsis \fIstring\fR
481 String to append to displayed labels that have been truncated
482 due to exceeding \fB-labelmax\fR.  The default is \fB...\fR.
483 .TP 
484 \fB\-endimage \fIimageName\fR
485 Specify an image to be drawn after tabs (ie. on the right if -side = top).
486 This is used by
487 a binding looking for \fIendimage\fR from the \fBnearest\fR subcommand.
488 .TP 
489 \fB\-fillwidth \fIboolean\fR
490 Indicates if extra space should be allocated to tabs when multiple tiers
491 are displayed.  The default is \fByes\fR.
492 .TP
493 \fB\-font \fIfontName\fR 
494 Sets the default font for the text in tab labels.  Individual tabs may
495 override this by setting the tab's \fB\-font\fR option.  The default value is
496 \fB*-Helvetica-Bold-R-Normal-*-12-120-*\fR.
497 .TP
498 \fB\-foreground \fIcolor\fR 
499 Sets the default color of tab labels.  Individual tabs may
500 override this option by setting the tab's \fB\-foreground\fR option.  
501 The default value is \fBblack\fR.
502 .TP 
503 \fB\-gap \fIsize\fR
504 Sets the gap (in pixels) between tabs.  The default value is \fB2\fR.
505 .TP 
506 \fB\-gapleft \fIsize\fR
507 Sets a gap (in pixels) to leave between the text and -leftimage.
508 The default value is \fB2\fR.
509 .TP
510 \fB\-height \fIpixels\fR
511 Specifies the requested height of widget.  If \fIpixels\fR is
512 0, then the height of the widget will be calculated based on
513 the size the tabs and their pages.
514 The default is \fB0\fR.
515 .TP 
516 \fB\-highlightbackground  \fIcolor\fR
517 Sets the color to display in the traversal highlight region when
518 the tabset does not have the input focus.  
519 .TP 
520 \fB\-highlightcolor \fIcolor\fR
521 Sets the color to use for the traversal highlight rectangle that is
522 drawn around the widget when it has the input focus. 
523 The default is \fBblack\fR.
524 .TP 
525 \fB\-highlightthickness \fIpixels\fR
526 Sets the width of the highlight rectangle to draw around the outside of 
527 the widget when it has the input focus. \fIPixels\fR is a non-negative 
528 value and may have any of the forms acceptable to \fBTk_GetPixels\fR.
529 If the value is zero, no focus highlight is drawn around the widget.
530 The default is \fB2\fR.
531 .TP
532 \fB\-labelbackground \fIcolor\fR
533 Sets a background color for the label.  
534 The default is \f""\fR.
535 .TP
536 \fB\-labelmax \fIlength\fR
537 Length at which to truncate displayed label text after
538 appending value of \fB-ellipsis\fR.
539 This enables a user implemention of truncating labels as the number
540 of tabs increases.
541 Default is \fB0\fR meaning do no truncation.
542 .TP
543 \fB\-outerpad \fIpixels\fR
544 Padding around the exterior of the tabset and folder.
545 .TP
546 \fB\-pageheight \fIpixels\fR
547 Sets the requested height of the page.  The page is the area under the
548 tab used to display the page contents.  If \fIpixels\fR is \fB0\fR,
549 the maximum height of all embedded tab windows is used.  The default
550 is \fB0\fR.
551 .TP
552 \fB\-pagewidth \fIpixels\fR
553 Sets the requested width of the page.  The page is the area under the
554 tab used to display the page contents.  If \fIpixels\fR is \fB0\fR,
555 the maximum width of all embedded tab windows is used.  The default
556 is \fB0\fR.
557 .TP
558 \fB\-perforationcommand\fR \fIstring\fR
559 Specifies a Tcl script to be invoked to tear off the current
560 page in the tabset. This command is typically invoked when 
561 left mouse button is released over the tab perforation.  The default
562 action is to tear-off the page and place it into a new toplevel 
563 window.
564 .TP
565 \fB\-relief \fIrelief\fR
566 Specifies the 3-D effect for the tabset widget.  \fIRelief\fR
567 specifies how the tabset should appear relative to widget that
568 it is packed into; for example, \fBraised\fR means the tabset should
569 appear to protrude.  The default is \fBsunken\fR.
570 .TP
571 \fB\-rotate \fItheta\fR
572 Specifies the degrees to rotate text in tab labels.
573 \fITheta\fR is a real value representing the number of degrees
574 to rotate the tick labels.  The default is \fB0.0\fR degrees.
575 .TP 
576 \fB\-samewidth \fIboolean\fR
577 Indicates if each tab should be the same width.  If true, each tab will
578 be as wide as the widest tab.  The default is \fBno\fR.
579 .TP 
580 \fB\-scrollcommand \fIstring\fR
581 Specifies the prefix for a command for communicating with 
582 scrollbars.  Whenever the view in the widget's window 
583 changes, the widget will generate a Tcl command by concatenating the 
584 scroll command and two numbers.  If this option is not specified, then 
585 no command will be executed. 
586 .TP 
587 \fB\-scrollincrement \fIpixels\fR
588 Sets the smallest number of pixels to scroll the tabs. 
589 If \fIpixels\fR is greater than 0, this sets the units for 
590 scrolling (e.g.,  when you the change the view by clicking
591 on the left and right arrows of a scrollbar).
592 .TP
593 \fB\-selectbackground \fIcolor\fR
594 Sets the color to use when displaying background of the selected
595 tab. Individual tabs can override this option by setting the tab's 
596 \fB\-selectbackground\fR option.
597 '\".TP 
598 '\" \fB\-selectborderwidth \fIpixels\fR
599 '\" Sets the width of the raised 3-D border to draw around the label of 
600 '\" the selected tab.  \fIPixels\fR must be a non-negative value.
601 '\" The default value is \fB1\fR.
602 .TP
603 \fB\-selectcommand \fIstring\fR
604 Specifies a default Tcl script to be invoked when tabs are selected.  This
605 command is typically invoked when left mouse button is pressed over 
606 the tab.  Individual tabs may override this with the tab's
607 \fB\-command\fR option.  Alternatively, the \fB<<TabsetSelect>>\fR virtual
608 event may be bound to instead.
609 The default value is \fB""\fR.
610 .TP
611 \fB\-selectforeground \fIcolor\fB
612 Sets the default color of the selected tab's text label. 
613 Individual tabs can override this option by setting the tab's 
614 \fB\-selectforeground\fR option. The default value is \fBblack\fR.
615 .TP
616 \fB\-selectpad \fIpixels\fB
617 Specifies extra padding to be displayed around the selected tab. 
618 The default value is \fB3\fR.
619 .TP 
620 \fB\-shadow \fIcolorAndOffset\fR
621 Sets the shadow color for the text in all tab labels.
622 If an offset isn't given, it defaults to 1.  Drop shadows
623 are useful when both the foreground and background of the tab
624 have similar color intensities.
625 If \fIcolor\fR is the empty string, no shadow is drawn.
626 The default value is \fB""\fR.
627 .TP 
628 \fB\-shadowcolor \fIcolor\fR
629 Sets the folder shadow color.
630 .TP
631 \fB\-side \fIside\fB
632 Specifies the side of the widget to place tabs. The following
633 values are valid for \fIside\fR. The default value is \fBtop\fR.
634 .RS
635 .TP 1i
636 \fBtop\fR
637 Tabs are drawn along the top.
638 .TP 1i
639 \fBleft\fR
640 Tabs are drawn along the left side.
641 .TP 1i
642 \fBright\fR
643 Tabs are drawn along the right side.
644 .TP 1i
645 \fBboth\fR
646 Tabs are drawn along the bottom side.
647 .RE
648 .TP 
649 \fB\-slant \fIslant\fR
650 Specifies if the tabs should be slanted 45 degrees on the left and/or 
651 right sides. The following values are valid for \fIslant\fR. The default 
652 is \fBnone\fR.
653 .RS
654 .TP 1i
655 \fBnone\fR
656 Tabs are drawn as a rectangle.  
657 .TP 1i
658 \fBleft\fR
659 The left side of the tab is slanted.  
660 .TP 1i
661 \fBright\fR
662 The right side of the tab is slanted.  
663 .TP 1i
664 \fBboth\fR
665 Boths sides of the tab are slanted.
666 .RE
667 .TP 
668 \fB\-startimage \fIimageName\fR
669 Specify an image to be drawn before tabs (ie. on the left if -side = top).
670 This is used by
671 a binding looking for \fIstartimage\fR from the \fBnearest\fR subcommand.
672 .TP
673 \fB\-tabbackground \fIcolor\fR
674 Sets the default background color of tabs.
675 Individual tabs can override this option by setting the tab's 
676 \fB\-background\fR option.
677 .TP
678 \fB\-tabborderwidth \fIpixels\fR
679 Sets the width of the 3\-D border around the outside edge of the tab.  The
680 \fB\-tabrelief\fR option determines how the border is to be drawn.  The
681 default is \fB2\fR.
682 .TP
683 \fB\-tabforeground \fIcolor\fR
684 Specifies the color to use when displaying a tab's label.
685 Individual tabs can override this option by setting the tab's 
686 \fB\-foreground\fR option.
687 .TP
688 \fB\-tabrelief \fIrelief\fR
689 Specifies the 3-D effect for both tabs and folders.  \fIRelief\fR
690 specifies how the tabs should appear relative to background of the 
691 widget; for example, \fBraised\fR means the tab should
692 appear to protrude.  The default is \fBraised\fR.
693 .TP
694 \fB\-tabtile \fIimage\fR 
695 Specifies tiled background for tabs.  The default is \fB""\fR.
696 .TP
697 \fB\-takefocus\fR \fIfocus\fR 
698 Provides information used when moving the focus from window to window
699 via keyboard traversal (e.g., Tab and Shift-Tab).  If \fIfocus\fR is
700 \fB0\fR, this means that this window should be skipped entirely during
701 keyboard traversal.  \fB1\fR means that the this window should always
702 receive the input focus.  An empty value means that the traversal
703 scripts decide whether to focus on the window.
704 The default is \fB1\fR.
705 .TP
706 \fB\-tearoff \fIboolean\fR
707 Display tearoff.
708 .TP
709 \fB\-textside \fIside\fB
710 If both images and text are specified for a tab, this option determines on
711 which side of the tab the text is to be displayed. The 
712 valid sides are \fBleft\fR, \fBright\fR, \fBtop\fR, and
713 \fBbottom\fR.  The default value is \fBleft\fR.
714 .TP
715 \fB\-tiers \fInumber\fB
716 Specifies the maximum number of tiers to use to display the tabs.
717 The default value is \fB1\fR.
718 .TP
719 \fB\-tile \fIimage\fR 
720 Specifies a tiled background for the widget background excluding
721 the tabs.  If \fIimage\fR isn't
722 \fB""\fR, the background is tiled using \fIimage\fR.
723 Otherwise, the normal background color is drawn (see the
724 \fB\-background\fR option).  \fIImage\fR must be an image created
725 using the Tk \fBimage\fR command.  The default is \fB""\fR.
726 Specifies a tiled background image for the background of the widget.
727 This does not include the tabs.
728 .TP
729 \fB\-transient \fIboolean\fR
730 Tearoff window should be transient.
731 .TP
732 \fB\-width \fIpixels\fR
733 Specifies the requested width of the widget.  If \fIpixels\fR is
734 0, then the width of the widget will be calculated based on
735 the size the tabs and their pages.
736 The default is \fB0\fR.
737 .SH "TAB OPTIONS"
738 In addition to the \fBconfigure\fR operation, widget configuration
739 options may also be set by the Tk \fBoption\fR command.  The class
740 resource name is \fBTab\fR.
741 .CS
742 option add *Tabset.Tab.Foreground white
743 option add *Tabset.name.Background blue
744 .CE
745 The following widget options are available:
746 .TP
747 \fB\-activebackground \fIcolor\fR
748 Sets the active background color for \fInameOrIndex\fR.  A tab is active
749 when the mouse is positioned over it or set by the \fBactivate\fR
750 operation.  This overrides the widget's \fB-activebackground\fR 
751 option. 
752 .TP
753 \fB\-activeforeground \fIcolor\fR
754 Sets the default active foreground color \fInameOrIndex\fR.  A tab is "active"
755 when the mouse is positioned over it or set by the \fBactivate\fR
756 operation.  Individual tabs may override this option by setting the
757 tab's \fB-activeforeground\fR option.
758 .TP
759 \fB\-anchor \fIanchor\fR 
760 Anchors the tab's embedded widget to a particular edge of the folder.
761 This option has effect only if the space in the folder surrounding the 
762 embedded widget is larger than the widget itself. \fIAnchor\fR specifies
763 how the widget will be positioned in the extra space.  For example, if
764 \fIanchor\fR is \fBcenter\fR then the window is centered in the folder
765 ; if \fIanchor\fR is \fBw\fR then the window will
766 be aligned with the leftmost edge of the folder. The default value is
767 \fBcenter\fR.
768 .TP
769 \fB\-background \fIcolor\fR
770 Sets the background color for \fInameOrIndex\fR.  Setting this option overides the 
771 widget's \fB\-tabbackground\fR option.
772 .TP
773 \fB\-bindtags \fItagList\fR
774 Specifies the binding tags for this tab.  \fITagList\fR is a list of
775 binding tag names.  The tags and their order will determine how
776 commands for events in tabs are invoked.  Each tag in the list matching 
777 the event sequence will have its Tcl command executed.  Implicitly the 
778 name of the tab is always the first tag in the list.  The default value is
779 \fBall\fR.
780 .TP
781 \fB\-command \fIstring\fR
782 Specifies a Tcl script to be associated with \fInameOrIndex\fR.  This
783 command is typically invoked when left mouse button is pressed over 
784 the tab.  Setting this option overrides the widget's
785 \fB\-selectcommand\fR option. 
786 .TP
787 \fB\-data \fIstring\fR
788 Specifies a string to be associated with \fInameOrIndex\fR.
789 This value isn't used in the widget code.  It may be used in Tcl bindings 
790 to associate extra data (other than the image or text) with the
791 tab. The default value is \fB""\fR.
792 .TP
793 \fB\-fill \fIfill\fR
794 If the space in the folder surrounding the tab's embedded widget is 
795 larger than the widget, then \fIfill\fR indicates if the embedded widget 
796 should be stretched to occupy the extra space.  \fIFill\fR is either 
797 \fBnone\fR,
798 \fBx\fR, \fBy\fR, \fBboth\fR.  For example, if \fIfill\fR is \fBx\fR,
799 then the widget is stretched horizontally.  If \fIfill\fR is \fBy\fR,
800 the widget is stretched vertically.  The default is \fBnone\fR.
801 .TP
802 \fB\-font \fIfontName\fR 
803 Sets the font for the text in tab labels.  If \fIfontName\fR is not
804 the empty string, this overrides the tabset's \fB\-font\fR option.
805 The default value is \fB""\fR.
806 .TP
807 \fB\-foreground \fIcolor\fR 
808 Sets the color of the label for \fInameOrIndex\fR.  If \fIcolor\fR
809 is not the empty string, this overrides the widget's \fB\-tabforeground\fR 
810 option.  The default value is \fB""\fR.
811 .TP 
812 \fB\-hidden \fIbool\fR
813 Hide the tab.  The default is \fB0\fR.  The tab should be changed to not
814 be the selected tab before setting it to hidden.
815 .TP 
816 \fB\-image \fIimageName\fR
817 Specifies the image to be drawn in label for \fInameOrIndex\fR.
818 If \fIimage\fR is \fB""\fR, no image will be drawn.  Both text and
819 images may be displayed at the same time in tab labels.
820 The default value is \fB""\fR.
821 .TP 
822 \fB\-leftimage \fIimageName\fR
823 Specify a second image to be drawn to the left before text/image when
824 the widgets -textside = right.
825 This image might represent a close icon when used with
826 a binding that looks for \fIleftimage\fR from the \fBnearest\fR subcommand.
827 .TP
828 \fB\-ipadx \fIpad\fR
829 Sets the padding to the left and right of the label.
830 \fIPad\fR can be a list of one or two screen distances.  If \fIpad\fR
831 has two elements, the left side of the label is padded by the first
832 distance and the right side by the second.  If \fIpad\fR has just one
833 distance, both the left and right sides are padded evenly.  The
834 default value is \fB0\fR.
835 .TP
836 \fB\-ipady \fIpad\fR
837 Sets the padding to the top and bottom of the label.
838 \fIPad\fR can be a list of one or two screen distances.  If \fIpad\fR
839 has two elements, the top of the label is padded by the first
840 distance and the bottom by the second.  If \fIpad\fR has just one
841 distance, both the top and bottom sides are padded evenly.  The
842 default value is \fB0\fR.
843 .TP
844 \fB\-padx \fIpad\fR
845 Sets the padding around the left and right of the embedded widget, if 
846 one exists.
847 \fIPad\fR can be a list of one or two screen distances.  If \fIpad\fR
848 has two elements, the left side of the widget is padded by the first
849 distance and the right side by the second.  If \fIpad\fR has just one
850 distance, both the left and right sides are padded evenly.  The
851 default value is \fB0\fR.
852 .TP
853 \fB\-pady \fIpad\fR
854 Sets the padding around the top and bottom of the embedded widget, if
855 one exists.
856 \fIPad\fR can be a list of one or two screen distances.  If \fIpad\fR
857 has two elements, the top of the widget is padded by the first
858 distance and the bottom by the second.  If \fIpad\fR has just one
859 distance, both the top and bottom sides are padded evenly.  The
860 default value is \fB0\fR.
861 .TP 
862 \fB\-selectbackground \fIcolor\fR
863 Sets the color to use when displaying background of the selected
864 tab. If \fIcolor\fR is not the empty string, this overrides the
865 widget's \fB\-selectbackground\fR option. The default value is
866 \fB""\fR.
867 .TP 
868 \fB\-shadow \fIcolor\fR
869 Sets the shadow color for the text in the tab's label. Drop shadows
870 are useful when both the foreground and background of the tab
871 have similar color intensities.
872 If \fIcolor\fR is the empty string, no shadow is drawn.
873 The default value is \fB""\fR.
874 .TP
875 \fB\-state \fIstate\fR
876 Sets the state of the tab. If \fIstate\fR is \fBdisable\fR the
877 text of the tab is drawn as engraved and operations on the tab
878 (such as \fBinvoke\fR and \fBtab tearoff\fR) are ignored.
879 The default is \fBnormal\fR.
880 .TP
881 \fB\-stipple \fIbitmap\fR
882 Specifies a stipple pattern to use for the background of the folder
883 when the window is torn off.
884 \fIBitmap\fR specifies a bitmap to use as the stipple
885 pattern. The default is \fBBLT\fR.
886 .TP
887 \fB\-text \fItext\fR
888 Specifies the text of the tab's label.  The exact way the text is
889 drawn may be affected by other options such as \fB\-state\fR or
890 \fB\-rotate\fR.
891 .TP
892 \fB\-tornwindow \fItext\fR
893 Name of window that was torn off.
894 .TP
895 \fB\-underline \fInum\fR
896 Character to underline in text.  Default is -1.
897 .TP
898 \fB\-window \fIpathName\fR
899 Specifies the widget to be embedded into the tab.  \fIPathName\fR must
900 be a child of the \fBtabset\fR widget.  The tabset will "pack" and
901 manage the size and placement of \fIpathName\fR.
902 The default value is \fB""\fR.
903 .TP
904 \fB\-windowheight \fIpixels\fR
905 Sets the requested height of the page.  The page is the area under the
906 tab used to display the page contents.  If \fIpixels\fR is \fB0\fR,
907 the maximum height of all embedded tab windows is used.  The default
908 is \fB0\fR.
909 .TP
910 \fB\-windowwidth \fIpixels\fR
911 Sets the requested width of the page.  The page is the area under the
912 tab used to display the page contents.  If \fIpixels\fR is \fB0\fR,
913 the maximum width of all embedded tab windows is used.  The default
914 is \fB0\fR.
915 .SH "DEFAULT BINDINGS"
916 .PP
917 BLT automatically generates class bindings that supply tabsets their
918 default behaviors. The following event sequences are set by default 
919 for tabsets (via the class bind tag \fBTabset\fR):
920 .IP \fB<ButtonPress-2>\fR
921 .IP \fB<B2-Motion>\fR
922 .IP \fB<ButtonRelease-2>\fR
923 Mouse button 2 may be used for scanning.
924 If it is pressed and dragged over the tabset, the contents of
925 the tabset drag at high speed in the direction the mouse moves.
926 .IP \fB<KeyPress-Up>\fR
927 .IP \fB<KeyPress-Down>\fR
928 The up and down arrow keys move the focus to the tab immediately above
929 or below the current focus tab.  The tab with focus is drawn
930 with the a dashed outline around the tab label.
931 .IP \fB<KeyPress-Left>\fR
932 .IP \fB<KeyPress-Right>\fR
933 The left and right arrow keys move the focus to the tab immediately to the left
934 or right of the current focus tab.  The tab with focus is drawn
935 with the a dashed outline around the tab label.
936 .IP \fB<KeyPress-space>\fR
937 .IP \fB<KeyPress-Return>\fR
938 The space and return keys select the current tab given focus.
939 When a folder is selected, it's command is invoked and the 
940 embedded widget is mapped.
941 .PP
942 Each tab, by default, also has a set of bindings (via the tag
943 \fBall\fR).  These bindings may be reset using the tabset's 
944 \fBbind\fR operation.
945 .IP \fB<Enter>\fR
946 .IP \fB<Leave>\fR
947 When the mouse pointer enters a tab, it is activated (i.e. drawn in
948 its active colors) and when the pointer leaves, it is redrawn in
949 its normal colors.
950 .IP \fB<ButtonRelease-1>\fR
951 Clicking with the left mouse button on a tab causes the tab to be
952 selected and its Tcl script (see the \fB\-command\fR or
953 \fB\-selectcommand\fR options) to be invoked.  The folder and any embedded
954 widget (if one is specified) is automatically mapped.
955 .IP \fB<ButtonRelease-3>\fR
956 .IP \fB<Control-ButtonRelease-1>\fR
957 Clicking on the right mouse button (or the left mouse button with the
958 Control key held down) tears off the current page into its own toplevel
959 widget. The embedded widget is re-packed into a new toplevel and 
960 an outline of the widget is drawn in the folder.  Clicking again
961 (toggling) will reverse this operation and replace the page back in
962 the folder.
963 .SH "BIND TAGS"
964 You can bind commands to tabs that are triggered when a particular
965 event sequence occurs in them, much like canvas items in Tk's 
966 canvas widget.  Not all event sequences are valid.  The only binding 
967 events that may be specified are those related to the mouse and 
968 keyboard (such as \fBEnter\fR, \fBLeave\fR, \fBButtonPress\fR, 
969 \fBMotion\fR, and \fBKeyPress\fR).
970 .PP
971 It is possible for multiple bindings to match a particular event.
972 This could occur, for example, if one binding is associated with the
973 tab name and another is associated with the tab's tags
974 (see the \fB\-bindtags\fR option).  When this occurs, all the 
975 matching bindings are invoked.  A binding associated with the tab
976 name is invoked first, followed by one binding for each of the tab's 
977 bindtags.  If there are multiple matching bindings for a single tag, 
978 then only the most specific binding is invoked.  A continue command 
979 in a binding script terminates that script, and a break command 
980 terminates that script and skips any remaining scripts for the event, 
981 just as for the bind command.
982 .PP
983 The \fB\-bindtags\fR option for tabs controls addition tag names that
984 can be matched.  Implicitly the first tag for each tab is its name.
985 Setting the value of the \fB\-bindtags\fR option doesn't change this.
986 .PP
987 Note that the <<TabsetTearoff>> virtual event is generated on tearoff.
988 and the <<TabsetSelect>> virtual event is generated on selection.
989 .SH EXAMPLE
990 You create a tabset widget with the \fBtabset\fR command.
991 .CS
992 # Create a new tabset
993 tabset .ts -relief sunken -borderwidth 2 
994 .CE
995 A new Tcl command \fB.ts\fR is also created.  This command can be
996 used to query and modify the tabset.  For example, to change the
997 default font used by all the tab labels, you use the new command and
998 the tabset's \fBconfigure\fR operation.
999 .CS
1000 # Change the default font.
1001 \&.ts configure \-font "fixed"
1002 .CE
1003 You can then add folders using the \fBinsert\fR operation.
1004 .CS
1005 # Create a new folder "f1"
1006 \&.ts insert 0 "f1"
1007 .CE
1008 This inserts the new tab named "f1" into the tabset.  The index
1009 \fB0\fR indicates location to insert the new tab.  You can also use
1010 the index \fBend\fR to append a tab to the end of the tabset.  By
1011 default, the text of the tab is the name of the tab.  You can change
1012 this by configuring the \fB\-text\fR option.
1013 .CS
1014 # Change the label of "f1"
1015 \&.ts tab configure "f1" -text "Tab #1" 
1016 .CE
1017 The \fBinsert\fR operation lets you add one or more folders at a time.
1018 .CS
1019 \&.ts insert end "f2" -text "Tab #2" "f3" "f4" 
1020 .CE
1021 The tab on each folder contains a label.  A label may display both
1022 an image and a text string.  You can reconfigure the tab's attributes
1023 (foreground/background colors, font, rotation, etc) using the \fBtab
1024 configure\fR operation.
1025 .CS
1026 # Add an image to the label of "f1"
1027 set image [image create photo -file stopsign.gif]
1028 \&.ts tab configure "f1" -image $image
1029 \&.ts tab configure "f2" -rotate 90
1030 .CE
1031 Each folder may contain an embedded widget to represent its contents.
1032 The widget to be embedded must be a child of the tabset widget.  Using
1033 the \fB\-window\fR option, you specify the name of widget to be
1034 embedded.  But don't pack the widget, the tabset takes care of placing
1035 and arranging the widget for you.
1036 .CS
1037 graph .ts.graph
1038 \&.ts tab configure "f1" -window ".ts.graph" \\
1039     -fill both -padx 0.25i -pady 0.25i
1040 .CE
1041 The size of the folder is determined the sizes of the Tk widgets
1042 embedded inside each folder.  The folder will be as wide as the widest
1043 widget in any folder. The tallest determines the height.  You can use
1044 the tab's \fB\-pagewidth\fR and \fB\-pageheight\fR options override this.
1045 .PP
1046 Other options control how the widget appears in the folder.  The
1047 \fB\-fill\fR option says that you wish to have the widget stretch to
1048 fill the available space in the folder.
1049 .CS
1050 \&.ts tab configure "f1" -fill both -padx 0.25i -pady 0.25i
1051 .CE
1052 .PP
1053 Now when you click the left mouse button on "f1", the
1054 graph will be displayed in the folder.  It will be automatically
1055 hidden when another folder is selected.  If you click on the right
1056 mouse button, the embedded widget will be moved into a toplevel widget 
1057 of its own.  Clicking again on the right mouse button puts it back into 
1058 the folder.
1059 .PP
1060 If you want to share a page between two different folders, the
1061 \fB\-command\fR option lets you specify a Tcl command to be invoked
1062 whenever the folder is selected.  You can reset the \fB\-window\fR
1063 option for the tab whenever it's clicked.
1064 .CS
1065 \&.ts tab configure "f2" -command { 
1066     \&.ts tab configure "f2" -window ".ts.graph"
1067 }
1068 \&.ts tab configure "f1" -command { 
1069     \&.ts tab configure "f1" -window ".ts.graph"
1070 }
1071 .CE
1072 If you have many folders, you may wish to stack tabs in multiple
1073 tiers.  The tabset's \fB\-tiers\fR option requests a maximum
1074 number of tiers.   The default is one tier.  
1075 .CS
1076 \&.ts configure -tiers 2
1077 .CE
1078 If the tabs can fit in less tiers, the widget will use that many.  
1079 Whenever there are more tabs than can be displayed in the maximum number
1080 of tiers, the tabset will automatically let you scroll the tabs.  You
1081 can even attach a scrollbar to the tabset.
1082 .CS
1083 \&.ts configure -scrollcommand { .sbar set }  -scrollincrement 20
1084 \&.sbar configure -orient horizontal -command { .ts view }
1085 .CE
1086 By default tabs are along the top of the tabset from left to right.  
1087 But tabs can be placed on any side of the tabset using the \fB\-side\fR
1088 option.
1089 .CS
1090 # Arrange tabs along the right side of the tabset. 
1091 \&.ts configure -side right -rotate 270
1092 .CE
1093 .SH KEYWORDS
1094 tabset, widget