summaryrefslogtreecommitdiff
path: root/itcl/iwidgets3.0.0/demos/html/tabnotebook.n.html
blob: c900fff8685f6895400d8caea2d0e493dffd0653 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
<HTML>
<HEAD>
<TITLE>iwidgets2.2.0 User Commands - tabnotebook</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H1>iwidgets2.2.0 User Commands - tabnotebook</H1>
<HR>
<PRE>

</PRE>
<H2><HR ALIGN=LEFT WIDTH=70% SIZE=3></H2><PRE>


</PRE>
<H2>NAME</H2><PRE>
     tabnotebook - create and manipulate tabnotebook widgets


</PRE>
<H2>SYNOPSIS</H2><PRE>
     <STRONG>tabnotebook</STRONG> <EM>pathName</EM>? <EM>options</EM>?


</PRE>
<H2>INHERITANCE</H2><PRE>
     itk::Widget &lt;- tabnotebook


</PRE>
<H2>STANDARD OPTIONS</H2><PRE>
     <STRONG>background</STRONG>      <STRONG>disabledForeground</STRONG>             <STRONG>foregroundscrollCommand</STRONG>
     <STRONG>cursor</STRONG>          <STRONG>font</STRONG>           <STRONG>height</STRONG>          <STRONG>width</STRONG>

     See the "options" manual entry for details on  the  standard
     options.


</PRE>
<H2>WIDGET-SPECIFIC OPTIONS</H2><PRE>
     Name:           <STRONG>angle</STRONG>
     Class:          <STRONG>Angle</STRONG>
     Command-Line Switch:           <STRONG>-angle</STRONG>

          Specifes the angle of slope from the inner edge to  the
          outer  edge  of the tab. An angle of 0 specifies square
          tabs. Valid ranges  are  0  to  45  degrees  inclusive.
          Default is 15 degrees. If <STRONG>tabPos</STRONG> is e or w, this option
          is ignored.

     Name:           <STRONG>auto</STRONG>
     Class:          <STRONG>Auto</STRONG>
     Command-Line Switch:           <STRONG>-auto</STRONG>

          Specifies    whether    to    use     the     automatic
          packing/unpacking algorithm of the notebook. A value of
          true indicates that page frames will  be  unpacked  and
          packed  acoording  to  the  algorithm  described in the
          select command. A value of  <STRONG>false</STRONG>  leaves  the  current
          page  packed  and subsequent <STRONG>selects</STRONG>, <STRONG>next</STRONG>, or <STRONG>previous</STRONG>
          commands do not switch pages automatically.  In  either
          case   the  page's  associated  command  (see  the  <STRONG>add</STRONG>
          command's  description  of  the  command   option)   is
          invoked.  The  value may have any of the forms accepted
          by the <STRONG>Tcl_GetBoolean</STRONG>, such as <STRONG>true</STRONG>, <STRONG>false</STRONG>, <STRONG>0</STRONG>, <STRONG>1</STRONG>,  <STRONG>yes</STRONG>,
          or <STRONG>no</STRONG>.

     Name:           <STRONG>backdrop</STRONG>
     Class:          <STRONG>Backdrop</STRONG>
     Command-Line Switch:           <STRONG>-backdrop</STRONG>

          Specifies a background color to use when filling in the
          backdrop area behind the tabs.

     Name:           <STRONG>background</STRONG>
     Class:          <STRONG>Background</STRONG>
     Command-Line Switch:           <STRONG>-background</STRONG>

          Specifies a background color to use  for  displaying  a
          page  and its associated tab. This can be thought of as
          the selected tab background color, since the tab  asso-
          ciated with the selected page is the selected tab.

     Name:           <STRONG>bevelAmount</STRONG>
     Class:          <STRONG>BevelAmount</STRONG>
     Command-Line Switch:           <STRONG>-bevelamount</STRONG>

          Specifes the size of tab corners. A  value  of  0  with
          <STRONG>angle</STRONG> set to 0 results in square tabs. A <STRONG>bevelAmount</STRONG> of
          4, means that the tab will be drawn with angled corners
          that  cut  in  4  pixels  from the edge of the tab. The
          default is 0.

     Name:           <STRONG>borderWidth</STRONG>
     Class:          <STRONG>BorderWidth</STRONG>
     Command-Line Switch:           <STRONG>-borderwidth</STRONG>

          Specifies the width of shadowed border to place  around
          the notebook area of the tabnotebook. The default value
          is 2.

     Name:           <STRONG>disabledForeground</STRONG>
     Class:          <STRONG>DisabledForeground</STRONG>
     Command-Line Switch:           <STRONG>-disabledforeground</STRONG>

          Specifies a foreground color to use  for  displaying  a
          tab's label when its <STRONG>state</STRONG> is disabled.

     Name:           <STRONG>equalTabs</STRONG>
     Class:          <STRONG>EqualTabs</STRONG>
     Command-Line Switch:           <STRONG>-equaltabs</STRONG>

          Specifies whether to force tabs to be  equal  sized  or
          not.  A  value of <STRONG>true</STRONG> means constrain tabs to be equal
          sized. A value of <STRONG>false</STRONG> allows each tab to  size  based
          on  the  text label size. The value may have any of the
          forms accepted by the  <STRONG>Tcl_GetBoolean</STRONG>,  such  as  <STRONG>true</STRONG>,
          <STRONG>false</STRONG>, <STRONG>0</STRONG>, <STRONG>1</STRONG>, <STRONG>yes</STRONG>, or <STRONG>no</STRONG>.

          For horizontally positioned tabs (<STRONG>tabpos</STRONG> is either <STRONG>s</STRONG> or
          <STRONG>n</STRONG>),  <STRONG>true</STRONG>  forces all tabs to be equal width (the width
          being equal to the longest label plus any  <STRONG>padX</STRONG>  speci-
          fied). Horizontal tabs are always equal in height.

          For vertically positioned tabs (<STRONG>tabpos</STRONG> is either  <STRONG>w</STRONG>  or
          <STRONG>e</STRONG>), <STRONG>true</STRONG> forces all tabs to be equal height (the height
          being equal to the height of the label with the largest
          font).  Vertically  oriented  tabs  are always equal in
          width.

     Name:           <STRONG>foreground</STRONG>
     Class:          <STRONG>Foreground</STRONG>
     Command-Line Switch:           <STRONG>-foreground</STRONG>

          Specifies a foreground color to use  for  displaying  a
          page  and its associated tab label. This can be thought
          of as the selected tab background color, since the  tab
          associated with the selected page is the selected tab.

     Name:           <STRONG>gap</STRONG>
     Class:          <STRONG>Gap</STRONG>
     Command-Line Switch:           <STRONG>-gap</STRONG>

          Specifies the amount of pixel space  to  place  between
          each tab. Value may be any pixel offset value. In addi-
          tion, a special keyword <STRONG>overlap</STRONG>  can  be  used  as  the
          value to achieve a standard overlap of tabs. This value
          may have any of the forms acceptable to <STRONG>Tk_GetPixels</STRONG>.

     Name:           <STRONG>margin</STRONG>
     Class:          <STRONG>Margin</STRONG>
     Command-Line Switch:           <STRONG>-Bmargin</STRONG>

          Specifies the amount of space to place between the out-
          side  edge  of  the tabnotebook and the outside edge of
          its tabs. If <STRONG>tabPos</STRONG> is <STRONG>s</STRONG>, this is the amount  of  space
          between the bottom edge of the tabnotebook and the bot-
          tom edge of the set of tabs. If <STRONG>tabPos</STRONG> is  <STRONG>n</STRONG>,  this  is
          the  amount  of  space between the top edge of the tab-
          notebook and the top edge of the set of tabs. If <STRONG>tabPos</STRONG>
          is  <STRONG>e</STRONG>,  this  is  the amount of space between the right
          edge of the tabnotebook and the right edge of  the  set
          of  tabs.  If  <STRONG>tabPos</STRONG> is <STRONG>w</STRONG>, this is the amount of space
          between the left edge of the tabnotebook and  the  left
          edge of the set of tabs. This value may have any of the
          forms acceptable to <STRONG>Tk_GetPixels</STRONG>.

     Name:           <STRONG>padX</STRONG>
     Class:          <STRONG>PadX</STRONG>
     Command-Line Switch:           <STRONG>-padx</STRONG>

          Specifies a  non-negative  value  indicating  how  much
          extra  space  to  request for a tab around its label in
          the X-direction. When computing how large a  window  it
          needs,  the  tab  will  add this amount to the width it
          would normally need The tab  will  end  up  with  extra
          internal space to the left and right of its text label.
          This value may have any  of  the  forms  acceptable  to
          <STRONG>Tk_GetPixels</STRONG>.

     Name:           <STRONG>padY</STRONG>
     Class:          <STRONG>PadY</STRONG>
     Command-Line Switch:           <STRONG>-pady</STRONG>

          Specifies a  non-negative  value  indicating  how  much
          extra  space  to  request for a tab around its label in
          the Y-direction. When computing how large a  window  it
          needs,  the  tab  will add this amount to the height it
          would normally need The tab  will  end  up  with  extra
          internal space to the top and bottom of its text label.
          This value may have any  of  the  forms  acceptable  to
          <STRONG>Tk_GetPixels</STRONG>.

     Name:           <STRONG>raiseSelect</STRONG>
     Class:          <STRONG>RaiseSelect</STRONG>
     Command-Line Switch:           <STRONG>-raiseselect</STRONG>

          Specifes whether to slightly  raise  the  selected  tab
          from  the rest of the tabs. The selected tab is drawn 2
          pixels closer to the outside of  the  tabnotebook  than
          the  unselected  tabs.  A  value  of <STRONG>true</STRONG> says to raise
          selected tabs, a value of <STRONG>false</STRONG> turns this feature off.
          The  default  is  <STRONG>false</STRONG>.  The value may have any of the
          forms accepted by the  <STRONG>Tcl_GetBoolean</STRONG>,  such  as  <STRONG>true</STRONG>,
          <STRONG>false</STRONG>, <STRONG>0</STRONG>, <STRONG>1</STRONG>, <STRONG>yes</STRONG>, or <STRONG>no</STRONG>.

     Name:           <STRONG>start</STRONG>
     Class:          <STRONG>Start</STRONG>
     Command-Line Switch:           <STRONG>-start</STRONG>

          Specifies the amount of space to place between the left
          or top edge of the tabnotebook and the starting edge of
          its tabs. For horizontally positioned tabs, this is the
          amount  of  space between the left edge of the notebook
          and the left edge of  the  first  tab.  For  vertically
          positioned  tabs,  this  is the amount of space between
          the top of the notebook and the top of the  first  tab.
          This  value may change if the user performs a MButton-2
          scroll on the tabs. This value  may  have  any  of  the
          forms acceptable to <STRONG>Tk_GetPixels</STRONG>.

     Name:           <STRONG>state</STRONG>
     Class:          <STRONG>State</STRONG>
     Command-Line Switch:           <STRONG>-state</STRONG>

          Sets the active state of  the  tabnotebook.  Specifying
          <STRONG>normal</STRONG>  allows  all  pages to be selectable. Specifying
          <STRONG>disabled</STRONG> disables the notebook causing all page tabs to
          be drawn in the <STRONG>disabledForeground</STRONG> color.

     Name:           <STRONG>tabBackground</STRONG>
     Class:          <STRONG>TabBackground</STRONG>
     Command-Line Switch:           <STRONG>-tabbackground</STRONG>

          Specifies a background color to use for displaying  tab
          backgrounds  when  they  are in their unselected state.
          This is the background  associated  with  tabs  on  all
          pages other than the selected page.

     Name:           <STRONG>tabBorders</STRONG>
     Class:          <STRONG>TabBorders</STRONG>
     Command-Line Switch:           <STRONG>-tabborders</STRONG>

          Specifies whether to draw the borders of tabs that  are
          not selected. Specifying <STRONG>true</STRONG> (the default) draws these
          borders, specifying <STRONG>false</STRONG> draws only the border  around
          the  selected  tab. The value may have any of the forms
          accepted by the <STRONG>Tcl_GetBoolean</STRONG>, such as <STRONG>true</STRONG>, <STRONG>false</STRONG>, <STRONG>0</STRONG>,
          <STRONG>1</STRONG>, <STRONG>yes</STRONG>, or <STRONG>no</STRONG>.

     Name:           <STRONG>tabForeground</STRONG>
     Class:          <STRONG>TabForeground</STRONG>
     Command-Line Switch:           <STRONG>-tabforeground</STRONG>

          Specifies a foreground color to use for displaying  tab
          labels when they are in their unselected state. This is
          the foreground associated with tabs on all pages  other
          than the selected page.

     Name:           <STRONG>tabPos</STRONG>
     Class:          <STRONG>TabPos</STRONG>
     Command-Line Switch:           <STRONG>-tabpos</STRONG>

          Specifies the location of the set of tabs  in  relation
          to  the  notebook area. Must be n, s, e, or w. Defaults
          to s.

</PRE>
<H2><HR ALIGN=LEFT WIDTH=70% SIZE=3></H2><PRE>


</PRE>
<H2>DESCRIPTION</H2><PRE>
     The <STRONG>tabnotebook</STRONG> command creates a new window (given  by  the
     pathName  argument)  and makes it into a <STRONG>tabnotebook</STRONG> widget.
     Additional options, described above may be specified on  the
     command  line or in the option database to configure aspects
     of the tabnotebook such as its colors, font, and  text.  The
     tabnotebook  command  returns  its pathName argument. At the
     time this command is invoked, there must not exist a  window
     named pathName, but pathName's parent must exist.

     A <STRONG>tabnotebook</STRONG> is a widget that  contains  a  set  of  tabbed
     pages.  It  displays  one  page from the set as the selected
     page. A Tab displays the label for the page to which  it  is
     attached and serves as a page selector. When a page's tab is
     selected, the page's contents  are  displayed  in  the  page
     area.  The  selected  tab  has a three-dimensional effect to
     make it appear to float above the other tabs. The  tabs  are
     displayed  as  a group along either the left, top, right, or
     bottom edge. When first created a tabnotebook has no  pages.
     Pages   may  be  added  or  deleted  using  widget  commands
     described below.

     A special option may be provided  to  the  tabnotebook.  The
     <STRONG>-auto</STRONG> option specifies whether the tabnotebook will automat-
     ically handle the unpacking and packing of pages when  pages
     are  selected.  A  value of true signifies that the notebook
     will automatically manage it. This is the default  value.  A
     value  of  false  signifies  the  notebook  will not perform
     automatic switching of pages.


</PRE>
<H2>NOTEBOOK PAGES</H2><PRE>
     A tabnotebook's pages area  contains  a  single  child  site
     frame.  When  a  new  page  is created it is a child of this
     frame. The page's child site frame serves as a geometry con-
     tainer  for  applications  to  pack widgets into. It is this
     frame that is automatically unpacked or packed when the auto
     option  is  true.  This creates the effect of one page being
     visible at a time. When a new page is selected,  the  previ-
     ously  selected  page's  child  site  frame is automatically
     unpacked from the tabnotebook's child  site  frame  and  the
     newly   selected  page's  child  site  is  packed  into  the
     tabnotebook's child site frame.

     However, sometimes it is desirable to handle page changes in
     a  different manner. By specifying the <STRONG>auto</STRONG> option as <STRONG>false</STRONG>,
     child site packing can be disabled and done differently. For
     example,  all  widgets might be packed into the first page's
     child site <STRONG>frame</STRONG>. Then when a  new  page  is  selected,  the
     application can reconfigure the widgets and give the appear-
     ance that the page was flipped.

     In both cases the command option for a page specifies a  Tcl
     Command to execute when the page is selected. In the case of
     <STRONG>auto</STRONG> being <STRONG>true</STRONG>, it is between the unpacking of  the  previ-
     ously  selected  page  and the packing of the newly selected
     page.

     Notebook pages can also be controlled with  scroll  bars  or
     other  widgets that obey the <STRONG>scrollcommand</STRONG> protocol. By giv-
     ing a scrollbar a <STRONG>-command</STRONG> to call the tabnotebook's  <STRONG>select</STRONG>
     method, the tabnotebook can be controlled with a scrollbar.

     The notebook area is  implemented  with  the  notebook  mega
     widget.



</PRE>
<H2>TABS</H2><PRE>
     Tabs appear along the edge of the notebook  area.  Tabs  are
     drawn  to  appear  attached to their associated page. When a
     tab is clicked on, the associated page is selected  and  the
     tab  is  drawn as raised above all other tabs and as a seam-
     less part of its notebook page. Tabs can  be  controlled  in
     their  location  along  the  edges,  the angle tab sides are
     drawn with, gap  between  tabs,  starting  margin  of  tabs,
     internal  padding around text labels in a tab, the font, and
     its label.

     The Tab area is implemented with the <STRONG>tabset</STRONG> mega widget. See
     <STRONG>tabset(1)</STRONG>.  Tabs  may  be  oriented  along either the north,
     south, east, or west sides with the <STRONG>tabPos</STRONG> option. North and
     south  tabs  may appear as angled, square, or bevelled. West
     and east tabs may appear as square or bevelled. By  changing
     tab  gaps,  tab  angles,  bevelling,  orientations,  colors,
     fonts, start locations, and margins; tabs may  appear  in  a
     wide  variety  of  styles.  For  example,  it is possible to
     implement Microsoft-style tabs, Borland property tab styles,
     or Borland Delphi style tabs all with the same tabnotebook.


</PRE>
<H2>WIDGET-SPECIFIC METHODS</H2><PRE>
     The <STRONG>tabnotebook</STRONG> command creates a new Tcl command whose name
     is  <EM>pathName</EM>.  This  command  may  be used to invoke various
     operations on the widget. It has the following general form:

          <EM>pathName</EM> <EM>option</EM> ?<EM>arg</EM> <EM>arg</EM> ...?

     <EM>option</EM> and the <EM>arg</EM>s determine the exact behavior of the com-
     mand.

     Many of the widget commands for a notebook take as one argu-
     ment  an  indicator of which page of the notebook to operate
     on. These indicators are called indexes and may be specified
     in any of the following forms:

     <EM>number</EM>
          Specifies the page numerically, where 0 corresponds  to
          the first page in the notebook, 1 to the second, and so
          on.

     <STRONG>select</STRONG>
          Specifies the currently selected page's  index.  If  no
          page is currently selected, the value -1 is returned.

     <STRONG>end</STRONG>  Specifes the last page in the tabnotebook's  index.  If
          the notebook is empty this will return -1.

     <EM>pattern</EM>
          If the index doesn't satisfy any of  the  above  forms,
          then  this  form  is  used.  Pattern is pattern-matched
          against the label of each  page  in  the  notebook,  in
          order from the first to the last page, until a matching
          entry is found. The rules of Tcl_StringMatch are  used.
          The  following  commands  are  possible for tabnotebook
          widgets:

     <EM>pathName</EM> <STRONG>add</STRONG> ?<EM>option</EM> <EM>value</EM> <EM>option</EM> <EM>value</EM> ...?
          Add a new page at the end of  the  tabnotebook.  A  new
          child  site  frame  is  created. Returns the child site
          pathName. If additional  arguments  are  present,  they
          specify any of the following options:

          <STRONG>-angle</STRONG> <EM>value</EM>
               Specifes the angle of slope from the inner edge to
               the outer edge of the tab. An angle of 0 specifies
               square tabs. Valid ranges  are  0  to  45  degrees
               inclusive.  Default  is 15 degrees. If this option
               is specified as an  empty  string  (the  default),
               then  the angle option for the overall tabnotebook
               is used. This is generally only set  at  the  tab-
               notebook  level.  Tabs normally will want to share
               the same angle value.

          <STRONG>-background</STRONG> <EM>value</EM>
               Specifies a background color to use for displaying
               tabs when they are selected and for displaying the
               current page. If this option is  specified  as  an
               empty  string  (the  default), then the background
               option for the overall tabnotebook is used.

          <STRONG>-bevelamount</STRONG> <EM>value</EM>
               Specifes the size of tab corners.  A  value  of  0
               with  angle  set  to  0  results in square tabs. A
               bevelAmount of 4, means that the tab will be drawn
               with  angled corners that cut in 4 pixels from the
               edge of the tab. The default is 0.  This  is  gen-
               erally  only  set  at  the tabnotebook level. Tabs
               normally will want to share the same bevelAmount.

          <STRONG>-bitmap</STRONG> <EM>value</EM>
               If label is a non-empty string, specifies a bitmap
               to  display  in  this page's tab. Bitmap may be of
               any of the forms accepted by Tk_GetPixmap.

          <STRONG>-command</STRONG> <EM>value</EM>
               Specifies a Tcl command to be executed  when  this
               page  is  selected.  This  allows the programmer a
               hook to reconfigure this  page's  widgets  or  any
               other page's widgets.

               If the tabnotebook has  the  auto  option  set  to
               true, when a page is selected this command will be
               called immediately after the  previously  selected
               page  is unpacked and immediately before this page
               is selected. The index value select is valid  dur-
               ing  this  Tcl command. `index select' will return
               this page's page number.

               If the auto option is set to false, when a page is
               selected  the  unpack and pack calls are bypassed.
               This Tcl command is still called.

          <STRONG>-disabledforeground</STRONG> <EM>value</EM>
               Specifies a foreground color to use for displaying
               tab  labels  when tabs are in their disable state.
               If this option is specified  as  an  empty  string
               (the  default), then the disabledforeground option
               for the overall tabnotebook is used.

          <STRONG>-font</STRONG> <EM>value</EM>
               Specifies the font to  use  when  drawing  a  text
               label  on  a page tab. If this option is specified
               as an empty string then the font  option  for  the
               overall tabnotebook is used..

          <STRONG>-foreground</STRONG> <EM>value</EM>
               Specifies a foreground color to use for displaying
               tab  labels when they are selected. If this option
               is specified as an  empty  string  (the  default),
               then  the  foreground  option for the overall tab-
               notebook is used.

          <STRONG>-label</STRONG> <EM>value</EM>
               Specifies a string to display  as  an  identifying
               label for a notebook page. This label serves as an
               additional identifier used to reference the  page.
               This  label  may  be  used  for the index value in
               widget commands.

          <STRONG>-tabbackground</STRONG> <EM>value</EM>
               Specifies a background color to use for displaying
               a  tab  when  it is not elected. If this option is
               specified as an empty string (the  default),  then
               the  tabBackground option for the overall tabnote-
               book is used.

          <STRONG>-tabforeground</STRONG> <EM>value</EM>
               Specifies a foreground color to use for displaying
               the  tab's  text label when it is not selected. If
               this option is specified as an empty  string  (the
               default),  then  the  tabForeground option for the
               overall tabnotebook is used.

          <STRONG>-padx</STRONG> <EM>value</EM>
               Specifies a non-negative value indicating how much
               extra  space to request for a tab around its label
               in the X-direction. When  computing  how  large  a
               window  it  needs, the tab will add this amount to
               the width it would normally need The tab will  end
               up with extra internal space to the left and right
               of its text label. This value may have any of  the
               forms  acceptable  to Tk_GetPixels. If this option
               is specified as an  empty  string  (the  default),
               then  the  padX option for the overall tabnotebook
               is used

          <STRONG>-pady</STRONG> <EM>value</EM>
               Specifies a non-negative value indicating how much
               extra  space to request for a tab around its label
               in the Y-direction. When  computing  how  large  a
               window  it  needs, the tab will add this amount to
               the height it would normally need The tab will end
               up with extra internal space to the top and bottom
               of its text label. This value may have any of  the
               forms  acceptable  to Tk_GetPixels. If this option
               is specified as an  empty  string  (the  default),
               then  the  padY option for the overall tabnotebook
               is used

          <STRONG>-state</STRONG> <EM>value</EM>
               Specifies one of two states for the  page:  normal
               or  disabled.  In normal state unselected tabs are
               displayed using  the  tabforeground  and  tabback-
               ground  option  from  the tabnotebook or the page.
               Selected tabs and pages are  displayed  using  the
               foreground and background option from the tabnote-
               book or the page. The disabled  state  means  that
               the  page  and  its tab is insensitive: it doesn't
               respond to mouse button presses  or  releases.  In
               this state the entry is displayed according to its
               disabledForeground option for the tabnotebook  and
               the  background/tabbackground option from the page
               or the tabnotebook.

     <EM>pathName</EM> <STRONG>childSite</STRONG> ?<EM>index</EM>?
          If passed no arguments, returns a list of pathNames for
          all  the  pages in the tabnotebook. If the tab notebook
          is empty, an empty list is returned

          If <EM>index</EM> is passed, it returns  the  <EM>pathName</EM>  for  the
          page's  child  site  <STRONG>frame</STRONG>  specified by <EM>index</EM>. Widgets
          that are created with this <EM>pathName</EM> will  be  displayed
          when the associated page is selected. If <EM>index</EM> is not a
          valid index, an empty string is returned.

     <EM>pathName</EM> <STRONG>configure</STRONG> ?<EM>option</EM>? ?<EM>value</EM> <EM>option</EM> <EM>value</EM> ...?
          Query  or  modify  the  configuration  options  of  the
          widget.  If  no  <EM>option</EM>  is  specified,  returns a list
          describing all of the available  options  for  <EM>pathName</EM>
          (see  <STRONG>Tk_ConfigureInfo</STRONG> 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  correspond-
          ing  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. <EM>Option</EM> may have any of
          the values accepted by the tabnotebook command.

     <EM>pathName</EM> <STRONG>delete</STRONG> <EM>index1</EM> ?<EM>index2</EM>?
          Delete all of  the  pages  between  <EM>index1</EM>  and  <EM>index2</EM>
          inclusive.  If  <EM>index2</EM>  is  omitted then it defaults to
          <EM>index1</EM>. Returns an empty string.

     <EM>pathName</EM> <STRONG>index</STRONG> <EM>index</EM>
          Returns the numerical index corresponding to <EM>index</EM>.

     <EM>pathName</EM> <STRONG>insert</STRONG> <EM>index</EM> ?<EM>option</EM> <EM>value</EM> <EM>option</EM> <EM>value</EM> ...?
          Insert a new page in the tabnotebook  before  the  page
          specified  by <EM>index</EM>. A new child site <STRONG>frame</STRONG> is created.
          The additional arguments are the same as  for  the  <STRONG>add</STRONG>
          command. Returns the child site <EM>pathName</EM>.

     <EM>pathName</EM> <STRONG>next</STRONG>
          Advances the selected page to the next page  (order  is
          determined   by  insertion  order).  If  the  currently
          selected page is the last page  in  the  notebook,  the
          selection  wraps  around to the first page in the note-
          book. It behaves as if the user selected the new page.

          For notebooks with <STRONG>auto</STRONG> set to <STRONG>true</STRONG> the current  page's
          child  site  is unpacked from the notebook's child site
          frame. Then the next page's child site is  packed  into
          the  notebook's child site frame. The Tcl command given
          with the command option will be invoked  between  these
          two operations.

          For notebooks with <STRONG>auto</STRONG> set to <STRONG>false</STRONG>  the  Tcl  command
          given with the command option will be invoked.

     <EM>pathName</EM> <STRONG>pageconfigure</STRONG> <EM>index</EM> ?<EM>option</EM>? ?<EM>value</EM> <EM>option</EM> <EM>value</EM> ...?
          This  command  is  similar  to  the  <STRONG>configure</STRONG> command,
          except that it applies to the options for an individual
          page,  whereas configure applies to the options for the
          tabnotebook as a whole. <EM>Options</EM> may  have  any  of  the
          values  accepted  by the add widget command. If options
          are specified, options are modified as indicated in the
          command  and the command returns an empty string. If no
          options are specified, returns a  list  describing  the
          current  options  for  page index (see <STRONG>Tk_ConfigureInfo</STRONG>
          for information on the format of this list).

     <EM>pathName</EM> <STRONG>prev</STRONG>
          Moves the selected page to the previous page (order  is
          determined   by  insertion  order).  If  the  currently
          selected page is the first page in  the  notebook,  the
          selection  wraps  around  to the last page in the note-
          book. It behaves as if the user selected the new page.

          For notebooks with <STRONG>auto</STRONG> set to <STRONG>true</STRONG> the current  page's
          child  site  is unpacked from the notebook's child site
          <STRONG>frame</STRONG>. Then the previous page's child  site  is  packed
          into  the  notebook's child site frame. The Tcl command
          given with the command option will be  invoked  between
          these two operations.

          For notebooks with <STRONG>auto</STRONG> set to <STRONG>false</STRONG>  the  Tcl  command
          given with the command option will be invoked.

     <EM>pathName</EM> <STRONG>select</STRONG> <EM>index</EM>
          Selects the page specified by <EM>index</EM>  as  the  currently
          selected  page.  It behaves as if the user selected the
          new page.

          For notebooks with <STRONG>auto</STRONG> set to <STRONG>true</STRONG> the current  page's
          child  site  is unpacked from the notebook's child site
          frame. Then the <EM>index</EM> page's child site is packed  into
          the  notebook's child site frame. The Tcl command given
          with the command option will be invoked  between  these
          two operations.

          For notebooks with <STRONG>auto</STRONG> set to <STRONG>false</STRONG>  the  Tcl  command
          given with the command option will be invoked.

     <EM>pathName</EM> <STRONG>view</STRONG>
          Returns the currently selected page.  This  command  is
          for compatibility with the <STRONG>scrollbar</STRONG> widget.

     <EM>pathName</EM> <STRONG>view</STRONG> <EM>index</EM>
          Selects the page specified by <EM>index</EM>  as  the  currently
          selected  page.  This command is for compatibility with
          the <STRONG>scrollbar</STRONG> widget.

     <EM>pathName</EM> <STRONG>view</STRONG> <STRONG>moveto</STRONG> <EM>fraction</EM>
          Uses the <EM>fraction</EM> value to determine the  corresponding
          page to move to. This command is for compatibility with
          the <STRONG>scrollbar</STRONG> widget.

     <EM>pathName</EM> <STRONG>view</STRONG> <STRONG>scroll</STRONG> <EM>num</EM> <EM>what</EM>
          Uses the <EM>num</EM> value to determine how many pages to  move
          forward  or backward (<EM>num</EM> can be negative or positive).
          The <EM>what</EM> argument is ignored. This command is for  com-
          patibility with the <STRONG>scrollbar</STRONG> widget.


</PRE>
<H2>COMPONENTS</H2><PRE>
     Generally all behavior of the  internal  components,  <STRONG>tabset</STRONG>
     and  <STRONG>notebook</STRONG>  are  controlled via the <STRONG>pageconfigure</STRONG> method.
     The following section documents these two components.

     Name:   <STRONG>tabset</STRONG>
     Class:  <STRONG>Tabset</STRONG>

          This is the tabset component. It  implements  the  tabs
          that are associated with the notebook component.

          See the "<STRONG>Tabset</STRONG>" widget manual entry for details on the
          <STRONG>tabset</STRONG> component item.

     Name:   <STRONG>notebook</STRONG>
     Class:  <STRONG>Notebook</STRONG>

          This is the notebook component. It implements the note-
          book that contains the pages of the tabnotebook.

          See the "<STRONG>Notebook</STRONG>" widget manual entry for  details  on
          the <STRONG>notebook</STRONG> component item.


</PRE>
<H2>EXAMPLE</H2><PRE>
     Following is an example that creates a tabnotebook with  two
     pages.

          # Create the tabnotebook widget and pack it.
            tabnotebook .tn -width 100 -height 100
            pack .tn \
                  -anchor nw \
                  -fill both \
                  -expand yes \
                  -side left \
                  -padx 10 \
                  -pady 10

          # Add two pages to the tabnotebook,
          # labelled "Page One" and "Page Two"
            .tn add -label "Page One"
            .tn add -label "Page Two"

          # Get the child site frames of these two pages.
            set page1CS [.tn childsite 0]
            set page2CS [.tn childsite "Page Two"]

          # Create buttons on each page of the tabnotebook.
            button $page1CS.b -text "Button One"
            pack $page1CS.b
            button $page2CS.b -text "Button Two"
            pack $page2CS.b

          # Select the first page of the tabnotebook.
            .tn select 0


</PRE>
<H2>AUTHOR</H2><PRE>
     Bill W. Scott


</PRE>
<H2>KEYWORDS</H2><PRE>
     tab tabset notebook tabnotebook page







































</PRE>
</BODY>
</HTML>