| <TITLE>tabnotebook - create and manipulate tabnotebook widgets</TITLE> |
| <H1>tabnotebook - create and manipulate tabnotebook widgets</H1> |
| |
| </pre><H2>SYNOPSIS</H2> |
| <B>tabnotebook</B> <I>pathName</I>? <I>options</I>? |
| </pre><H2>INHERITANCE</H2> |
| itk::Widget <- tabnotebook |
| </pre><H2>STANDARD OPTIONS</H2> |
| <P> |
| <table cellpadding=5> |
| <td valign=top> |
| <B>background</B><br> |
| <B>cursor</B><br> |
| </td> |
| <td valign=top> |
| <B>disabledForeground</B><br> |
| <B>font</B><br> |
| </td> |
| <td valign=top> |
| <B>foreground</B><br> |
| <B>height</B><br> |
| </td> |
| <td valign=top> |
| <B>scrollCommand</B><br> |
| <B>width</B><br> |
| </td> |
| </table> |
| <P> |
| See the <A HREF="http://www.sco.com/Technology/tcl/man/tk_man/options.n.html"> "options" </A> manual entry for details on the standard options. |
| </pre><H2>WIDGET-SPECIFIC OPTIONS</H2> |
| <P> |
| <pre> |
| Name: <B>angle</B> |
| Class: <B>Angle</B> |
| Command-Line Switch: <B>-angle</B> |
| </pre> |
| <UL> |
| 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 <B>tabPos</B> is e or w, this option |
| is ignored. |
| </UL> |
| <P> |
| <pre> |
| Name: <B>auto</B> |
| Class: <B>Auto</B> |
| Command-Line Switch: <B>-auto</B> |
| </pre> |
| <UL> |
| 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 <B>false</B> leaves the current page packed and |
| subsequent <B>selects</B>, <B>next</B>, or <B>previous</B> commands do not |
| switch pages automatically. In either case the page's associated |
| command (see the <B>add</B> command's description of the command option) is |
| invoked. The value may have any of the forms accepted by |
| the <B>Tcl_GetBoolean</B>, such as <B>true</B>, <B>false</B>, <B>0</B>, |
| <B>1</B>, <B>yes</B>, or <B>no</B>. |
| </UL> |
| <P> |
| <pre> |
| Name: <B>backdrop</B> |
| Class: <B>Backdrop</B> |
| Command-Line Switch: <B>-backdrop</B> |
| </pre> |
| <UL> |
| Specifies a background color to use when filling in the backdrop area |
| behind the tabs. |
| </UL> |
| <P> |
| <pre> |
| Name: <B>background</B> |
| Class: <B>Background</B> |
| Command-Line Switch: <B>-background</B> |
| </pre> |
| <UL> |
| 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 associated with the selected page is the selected tab. |
| </UL> |
| <P> |
| <pre> |
| Name: <B>bevelAmount</B> |
| Class: <B>BevelAmount</B> |
| Command-Line Switch: <B>-bevelamount</B> |
| </pre> |
| <UL> |
| Specifes the size of tab corners. A value of 0 with <B>angle</B> set to |
| 0 results in square tabs. A <B>bevelAmount</B> 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. |
| </UL> |
| <P> |
| <pre> |
| Name: <B>borderWidth</B> |
| Class: <B>BorderWidth</B> |
| Command-Line Switch: <B>-borderwidth</B> |
| </pre> |
| <UL> |
| Specifies the width of shadowed border to place around the notebook area of |
| the tabnotebook. The default value is 2. |
| </UL> |
| <P> |
| <pre> |
| Name: <B>disabledForeground</B> |
| Class: <B>DisabledForeground</B> |
| Command-Line Switch: <B>-disabledforeground</B> |
| </pre> |
| <UL> |
| Specifies a foreground color to use for displaying a tab's label when |
| its <B>state</B> is disabled. |
| </UL> |
| <P> |
| <pre> |
| Name: <B>equalTabs</B> |
| Class: <B>EqualTabs</B> |
| Command-Line Switch: <B>-equaltabs</B> |
| </pre> |
| <UL> |
| Specifies whether to force tabs to be equal sized or not. A value |
| of <B>true</B> means constrain tabs to be equal sized. A value |
| of <B>false</B> allows each tab to size based on the text label size. The |
| value may have any of the forms accepted by the <B>Tcl_GetBoolean</B>, such |
| as <B>true</B>, <B>false</B>, <B>0</B>, <B>1</B>, <B>yes</B>, or <B>no</B>. |
| </UL> |
| <UL> |
| For horizontally positioned tabs (<B>tabpos</B> is either <B>s</B> or <B>n</B>), |
| <B>true</B> forces all tabs to be equal width (the width being equal to |
| the longest label plus any <B>padX</B> specified). Horizontal tabs are |
| always equal in height. |
| </UL> |
| <UL> |
| For vertically positioned tabs (<B>tabpos</B> is either <B>w</B> or <B>e</B>), |
| <B>true</B> 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. |
| </UL> |
| <P> |
| <pre> |
| Name: <B>foreground</B> |
| Class: <B>Foreground</B> |
| Command-Line Switch: <B>-foreground</B> |
| </pre> |
| <UL> |
| 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. |
| </UL> |
| <P> |
| <pre> |
| Name: <B>gap</B> |
| Class: <B>Gap</B> |
| Command-Line Switch: <B>-gap</B> |
| </pre> |
| <UL> |
| Specifies the amount of pixel space to place between each tab. Value may |
| be any pixel offset value. In addition, a special keyword <B>overlap</B> |
| can be used as the value to achieve a standard overlap of tabs. This value |
| may have any of the forms acceptable to <B>Tk_GetPixels</B>. |
| </UL> |
| <P> |
| <pre> |
| Name: <B>margin</B> |
| Class: <B>Margin</B> |
| Command-Line Switch: <B>-Bmargin</B> |
| </pre> |
| <UL> |
| Specifies the amount of space to place between the outside edge of the |
| tabnotebook and the outside edge of its tabs. If <B>tabPos</B> is <B>s</B>, |
| this is the amount of space between the bottom edge of the tabnotebook and |
| the bottom edge of the set of tabs. If <B>tabPos</B> is <B>n</B>, this is |
| the amount of space between the top edge of the tabnotebook and the top |
| edge of the set of tabs. If <B>tabPos</B> is <B>e</B>, this is the amount of |
| space between the right edge of the tabnotebook and the right edge of the |
| set of tabs. If <B>tabPos</B> is <B>w</B>, 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 <B>Tk_GetPixels</B>. |
| </UL> |
| <P> |
| <pre> |
| Name: <B>padX</B> |
| Class: <B>PadX</B> |
| Command-Line Switch: <B>-padx</B> |
| </pre> |
| <UL> |
| 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 <B>Tk_GetPixels</B>. |
| </UL> |
| <P> |
| <pre> |
| Name: <B>padY</B> |
| Class: <B>PadY</B> |
| Command-Line Switch: <B>-pady</B> |
| </pre> |
| <UL> |
| 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 <B>Tk_GetPixels</B>. |
| </UL> |
| <P> |
| <pre> |
| Name: <B>raiseSelect</B> |
| Class: <B>RaiseSelect</B> |
| Command-Line Switch: <B>-raiseselect</B> |
| </pre> |
| <UL> |
| 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 <B>true</B> says to |
| raise selected tabs, a value of <B>false</B> turns this feature off. The |
| default is <B>false</B>. The value may have any of the forms accepted |
| by the <B>Tcl_GetBoolean</B>, such as <B>true</B>, <B>false</B>, <B>0</B>, |
| <B>1</B>, <B>yes</B>, or <B>no</B>. |
| </UL> |
| <P> |
| <pre> |
| Name: <B>start</B> |
| Class: <B>Start</B> |
| Command-Line Switch: <B>-start</B> |
| </pre> |
| <UL> |
| 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 <B>Tk_GetPixels</B>. |
| </UL> |
| <P> |
| <pre> |
| Name: <B>state</B> |
| Class: <B>State</B> |
| Command-Line Switch: <B>-state</B> |
| </pre> |
| <UL> |
| Sets the active state of the tabnotebook. Specifying <B>normal</B> allows |
| all pages to be selectable. Specifying <B>disabled</B> disables the notebook |
| causing all page tabs to be drawn in the <B>disabledForeground</B> color. |
| </UL> |
| <P> |
| <pre> |
| Name: <B>tabBackground</B> |
| Class: <B>TabBackground</B> |
| Command-Line Switch: <B>-tabbackground</B> |
| </pre> |
| <UL> |
| 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. |
| </UL> |
| <P> |
| <pre> |
| Name: <B>tabBorders</B> |
| Class: <B>TabBorders</B> |
| Command-Line Switch: <B>-tabborders</B> |
| </pre> |
| <UL> |
| Specifies whether to draw the borders of tabs that are not selected. |
| Specifying <B>true</B> (the default) draws these borders, |
| specifying <B>false</B> draws only the border around the selected tab. The |
| value may have any of the forms accepted by the <B>Tcl_GetBoolean</B>, |
| such as <B>true</B>, <B>false</B>, <B>0</B>, <B>1</B>,<B> yes</B>, or <B>no</B>. |
| </UL> |
| <P> |
| <pre> |
| Name: <B>tabForeground</B> |
| Class: <B>TabForeground</B> |
| Command-Line Switch: <B>-tabforeground</B> |
| </pre> |
| <UL> |
| 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. |
| </UL> |
| <P> |
| <pre> |
| Name: <B>tabPos</B> |
| Class: <B>TabPos</B> |
| Command-Line Switch: <B>-tabpos</B> |
| </pre> |
| <UL> |
| Specifies the location of the set of tabs in relation to the notebook |
| area. Must be n, s, e, or w. Defaults to s. |
| </UL> |
| </pre><HR> |
| </pre><H2>DESCRIPTION</H2> |
| <P> |
| The <B>tabnotebook</B> command creates a new window (given by the pathName |
| argument) and makes it into a <B>tabnotebook</B> 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. |
| <P> |
| A <B>tabnotebook</B> 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. |
| <P> |
| A special option may be provided to the tabnotebook. The <B>-auto</B> |
| option specifies whether the tabnotebook will automatically 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> |
| 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 container 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 previously 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. |
| <P> |
| However, sometimes it is desirable to handle page changes in a different |
| manner. By specifying the <B>auto</B> option as <B>false</B>, child site |
| packing can be disabled and done differently. For example, all widgets |
| might be packed into the first page's child site <B>frame</B>. Then when |
| a new page is selected, the application can reconfigure the widgets |
| and give the appearance that the page was flipped. |
| <P> |
| In both cases the command option for a page specifies a Tcl Command |
| to execute when the page is selected. In the case of <B>auto</B> |
| being <B>true</B>, it is between the unpacking of the previously selected |
| page and the packing of the newly selected page. |
| <P> |
| Notebook pages can also be controlled with scroll bars or other widgets |
| that obey the <B>scrollcommand</B> protocol. By giving a scrollbar |
| a <B>-command</B> to call the tabnotebook's <B>select</B> method, the |
| tabnotebook can be controlled with a scrollbar. |
| <P> |
| The notebook area is implemented with the notebook mega widget. |
| </pre><H2>TABS</H2> |
| 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 seamless 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. |
| <P> |
| The Tab area is implemented with the <B>tabset</B> mega widget. |
| See <B>tabset(1)</B>. Tabs may be oriented along either the north, south, |
| east, or west sides with the <B>tabPos</B> 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> |
| <P> |
| The <B>tabnotebook</B> command creates a new Tcl command whose name |
| is <I>pathName</I>. This command may be used to invoke various operations |
| on the widget. It has the following general form: |
| <pre> |
| <I>pathName option </I>?<I>arg arg ...</I>? |
| </pre> |
| <I>option</I> and the <I>arg</I>s |
| determine the exact behavior of the command. |
| <P> |
| Many of the widget commands for a notebook take as one argument 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: |
| <DL> |
| <DT> <I>number</I> |
| </I></B> |
| <DD> Specifies the page numerically, where 0 corresponds to the first page |
| in the notebook, 1 to the second, and so on. |
| </DL> |
| <DL> |
| <DT> <B>select</B> |
| </I></B> |
| <DD> Specifies the currently selected page's index. If no page is currently |
| selected, the value -1 is returned. |
| </DL> |
| <DL> |
| <DT> <B>end</B> |
| </I></B> |
| <DD> Specifes the last page in the tabnotebook's index. If the notebook is empty |
| this will return -1. |
| </DL> |
| <DL> |
| <DT> <I>pattern</I> |
| </I></B> |
| <DD> 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: |
| </DL> |
| <DL> |
| <DT> <I>pathName</I> <B>add</B> ?<I>option</I> <I>value</I> <I>option</I> <I>value</I> ...? |
| </I></B> |
| <DD> 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: |
| </DL> |
| <UL> |
| <DL> |
| <DT> <B>-angle</B> <I>value</I> |
| </I></B> |
| <DD> 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 tabnotebook level. Tabs normally |
| will want to share the same angle value. |
| </DL> |
| <DL> |
| <DT> <B>-background</B> <I>value</I> |
| </I></B> |
| <DD> 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. |
| </DL> |
| <DL> |
| <DT> <B>-bevelamount</B> <I>value</I> |
| </I></B> |
| <DD> 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 generally only set at the tabnotebook level. |
| Tabs normally will want to share the same bevelAmount. |
| </DL> |
| <DL> |
| <DT> <B>-bitmap</B> <I>value</I> |
| </I></B> |
| <DD> 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. |
| </DL> |
| <DL> |
| <DT> <B>-command</B> <I>value</I> |
| </I></B> |
| <DD> 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. |
| <UL> |
| 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 during this Tcl command. `index select' will |
| return this page's page number. |
| </UL> |
| <UL> |
| 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. |
| </UL> |
| </DL> |
| <DL> |
| <DT> <B>-disabledforeground</B> <I>value</I> |
| </I></B> |
| <DD> 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. |
| </DL> |
| <DL> |
| <DT> <B>-font</B> <I>value</I> |
| </I></B> |
| <DD> 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.. |
| </DL> |
| <DL> |
| <DT> <B>-foreground</B> <I>value</I> |
| </I></B> |
| <DD> 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 tabnotebook is used. |
| </DL> |
| <DL> |
| <DT> <B>-label</B> <I>value</I> |
| </I></B> |
| <DD> 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. |
| </DL> |
| <DL> |
| <DT> <B>-tabbackground</B> <I>value</I> |
| </I></B> |
| <DD> 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 tabnotebook is used. |
| </DL> |
| <DL> |
| <DT> <B>-tabforeground</B> <I>value</I> |
| </I></B> |
| <DD> 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. |
| </DL> |
| <DL> |
| <DT> <B>-padx</B> <I>value</I> |
| </I></B> |
| <DD> 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 |
| </DL> |
| <DL> |
| <DT> <B>-pady</B> <I>value</I> |
| </I></B> |
| <DD> 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 |
| </DL> |
| <DL> |
| <DT> <B>-state</B> <I>value</I> |
| </I></B> |
| <DD> Specifies one of two states for the page: normal or disabled. In normal state |
| unselected tabs are displayed using the tabforeground and tabbackground |
| option from the tabnotebook or the page. Selected tabs and pages are |
| displayed using the foreground and background option from the tabnotebook 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. |
| </DL> |
| </UL> |
| <DL> |
| <DT> '>>>>>>>>>> |
| </I></B> |
| <DD> <I>pathName</I> <B>childSite</B> ?<I>index</I>? |
| 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 |
| <UL> |
| If <I>index</I> is passed, it returns the <I>pathName</I> for the page's |
| child site <B>frame</B> specified by <I>index</I>. Widgets that are created |
| with this <I>pathName</I> will be displayed when the associated page is |
| selected. If <I>index</I> is not a valid index, an empty string is returned. |
| </UL> |
| </DL> |
| <DL> |
| <DT> <I>pathName</I> <B>configure</B> ?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...? |
| </I></B> |
| <DD> Query or modify the configuration options of the widget. If no <I>option</I> |
| is specified, returns a list describing all of the available options |
| for <I>pathName</I> (see <B>Tk_ConfigureInfo</B> for information on the |
| format of this list). If option is specified with no value, then the |
| command returns a list describing the one named option (this list will be |
| identical to the corresponding sublist of the value returned if no option |
| is specified). If one or more option-value pairs are specified, then the |
| command modifies the given widget option(s) to have the given value(s); in |
| this case the command returns an empty string. <I>Option</I> may have any |
| of the values accepted by the tabnotebook command. |
| </DL> |
| <DL> |
| <DT> <I>pathName</I> <B>delete</B> <I>index1</I> ?<I>index2</I>? |
| </I></B> |
| <DD> Delete all of the pages between <I>index1</I> and <I>index2</I> inclusive. |
| If <I>index2</I> is omitted then it defaults to <I>index1</I>. Returns an |
| empty string. |
| </DL> |
| <DL> |
| <DT> <I>pathName</I> <B>index</B> <I>index</I> |
| </I></B> |
| <DD> Returns the numerical index corresponding to <I>index</I>. |
| </DL> |
| <DL> |
| <DT> <I>pathName</I> <B>insert</B> <I>index</I> ?<I>option</I> <I>value</I> <I>option</I> <I>value</I> ...? |
| </I></B> |
| <DD> Insert a new page in the tabnotebook before the page specified |
| by <I>index</I>. A new child site <B>frame</B> is created. The additional |
| arguments are the same as for the <B>add</B> command. Returns the |
| child site <I>pathName</I>. |
| </DL> |
| <DL> |
| <DT> <I>pathName</I> <B>next</B> |
| </I></B> |
| <DD> 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 |
| notebook. It behaves as if the user selected the new page. |
| <UL> |
| For notebooks with <B>auto</B> set to <B>true</B> 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. |
| </UL> |
| <UL> |
| For notebooks with <B>auto</B> set to <B>false</B> the Tcl command given |
| with the command option will be invoked. |
| </UL> |
| </DL> |
| <DL> |
| <DT> <I>pathName</I> <B>pageconfigure</B> <I>index</I> ?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...? |
| </I></B> |
| <DD> This command is similar to the <B>configure</B> command, except that it |
| applies to the options for an individual page, whereas configure applies |
| to the options for the tabnotebook as a whole. <I>Options</I> 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 <B>Tk_ConfigureInfo</B> |
| for information on the format of this list). |
| </DL> |
| <DL> |
| <DT> <I>pathName</I> <B>prev</B> |
| </I></B> |
| <DD> 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 notebook. It |
| behaves as if the user selected the new page. |
| <UL> |
| For notebooks with <B>auto</B> set to <B>true</B> the current page's |
| child site is unpacked from the notebook's child site <B>frame</B>. 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. |
| </UL> |
| <UL> |
| For notebooks with <B>auto</B> set to <B>false</B> the Tcl command given |
| with the command option will be invoked. |
| </UL> |
| </DL> |
| <DL> |
| <DT> <I>pathName</I> <B>select</B> <I>index</I> |
| </I></B> |
| <DD> Selects the page specified by <I>index</I> as the currently selected page. |
| It behaves as if the user selected the new page. |
| <UL> |
| For notebooks with <B>auto</B> set to <B>true</B> the current page's child |
| site is unpacked from the notebook's child site frame. Then the <I>index</I> |
| 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. |
| </UL> |
| <UL> |
| For notebooks with <B>auto</B> set to <B>false</B> the Tcl command given |
| with the command option will be invoked. |
| </UL> |
| </DL> |
| <DL> |
| <DT> <I>pathName</I> <B>view</B> |
| </I></B> |
| <DD> Returns the currently selected page. This command is for compatibility with |
| the <B>scrollbar</B> widget. |
| </DL> |
| <DL> |
| <DT> <I>pathName</I> <B>view</B> <I>index</I> |
| </I></B> |
| <DD> Selects the page specified by <I>index</I> as the currently selected page. |
| This command is for compatibility with the <B>scrollbar</B> widget. |
| </DL> |
| <DL> |
| <DT> <I>pathName</I> <B>view</B> <B>moveto</B> <I>fraction</I> |
| </I></B> |
| <DD> Uses the <I>fraction</I> value to determine the corresponding page to move to. |
| This command is for compatibility with the <B>scrollbar</B> widget. |
| </DL> |
| <DL> |
| <DT> <I>pathName</I> <B>view</B> <B>scroll</B> <I>num</I> <I>what</I> |
| </I></B> |
| <DD> Uses the <I>num</I> value to determine how many pages to move forward or |
| backward (<I>num</I> can be negative or positive). The <I>what</I> argument |
| is ignored. This command is for compatibility with the <B>scrollbar</B> widget. |
| </DL> |
| </pre><H2>COMPONENTS</H2> |
| <P> |
| Generally all behavior of the internal components, <B>tabset</B> |
| and <B>notebook</B> are controlled via the <B>pageconfigure</B> method. |
| The following section documents these two components. |
| <P> |
| <pre> |
| Name: <B>tabset</B> |
| Class: <B>Tabset</B> |
| </pre> |
| <UL> |
| This is the tabset component. It implements the tabs that are associated |
| with the notebook component. |
| </UL> |
| <UL> |
| See the "<B>Tabset</B>" widget manual entry for details on |
| the <B>tabset</B> component item. |
| </UL> |
| <P> |
| <pre> |
| Name: <B>notebook</B> |
| Class: <B>Notebook</B> |
| </pre> |
| <UL> |
| This is the notebook component. It implements the notebook that contains the |
| pages of the tabnotebook. |
| </UL> |
| <UL> |
| See the "<B>Notebook</B>" widget manual entry for details on |
| the <B>notebook</B> component item. |
| </UL> |
| </table> |
| </pre><H2>EXAMPLE</H2> |
| <P> |
| Following is an example that creates a tabnotebook with two pages. |
| <P> |
| <table cellpadding=5> |
| <td valign=top> |
| <UL><br> |
| the<br> |
| pack<br> |
| -width<br> |
| pack<br> |
| nw<br> |
| \\<br> |
| -side<br> |
| 10<br> |
| <UL><br> |
| pages<br> |
| #<br> |
| and<br> |
| add<br> |
| .tn<br> |
| Two"<br> |
| Get<br> |
| frames<br> |
| pages.<br> |
| childsite<br> |
| [.tn<br> |
| </UL><br> |
| buttons<br> |
| of<br> |
| $page1CS.b<br> |
| pack<br> |
| -text<br> |
| $page2CS.b<br> |
| Select<br> |
| of<br> |
| select<br> |
| </td> |
| <td valign=top> |
| </UL><br> |
| tabnotebook<br> |
| it.<br> |
| 100<br> |
| .tn<br> |
| \\<br> |
| -expand<br> |
| left<br> |
| \\<br> |
| #<br> |
| to<br> |
| labelled<br> |
| "Page<br> |
| -label<br> |
| add<br> |
| </UL><br> |
| the<br> |
| of<br> |
| set<br> |
| 0]<br> |
| childsite<br> |
| <UL><br> |
| on<br> |
| the<br> |
| -text<br> |
| $page1CS.b<br> |
| "Button<br> |
| </UL><br> |
| the<br> |
| the<br> |
| 0<br> |
| </td> |
| <td valign=top> |
| #<br> |
| widget<br> |
| tabnotebook<br> |
| -height<br> |
| \\<br> |
| -fill<br> |
| yes<br> |
| \\<br> |
| -pady<br> |
| Add<br> |
| the<br> |
| "Page<br> |
| Two"<br> |
| "Page<br> |
| -label<br> |
| <UL><br> |
| child<br> |
| these<br> |
| page1CS<br> |
| set<br> |
| "Page<br> |
| #<br> |
| each<br> |
| tabnotebook.<br> |
| "Button<br> |
| button<br> |
| Two"<br> |
| <UL><br> |
| first<br> |
| tabnotebook.<br> |
| </UL><br> |
| </td> |
| <td valign=top> |
| Create<br> |
| and<br> |
| .tn<br> |
| 100<br> |
| -anchor<br> |
| both<br> |
| \\<br> |
| -padx<br> |
| 10<br> |
| two<br> |
| tabnotebook,<br> |
| One"<br> |
| .tn<br> |
| One"<br> |
| "Page<br> |
| #<br> |
| site<br> |
| two<br> |
| [.tn<br> |
| page2CS<br> |
| Two"]<br> |
| Create<br> |
| page<br> |
| button<br> |
| One"<br> |
| $page2CS.b<br> |
| pack<br> |
| #<br> |
| page<br> |
| .tn<br> |
| </td> |
| </table> |
| </pre><H2>AUTHOR</H2> |
| Bill W. Scott |
| </pre><H2>KEYWORDS</H2> |
| tab tabset notebook tabnotebook page |