Artifact [1f651191bb]

Artifact 1f651191bb27604cc0f0cdcf7a839f1036f89cdc:

Wiki page [accordion] by schelte 2014-07-12 20:29:47.
D 2014-07-12T20:29:47.537
L accordion
U schelte
W 4932
<h1>accordion - a multi-paned container widget</h1>

<hr>

<h2>Synopsis</h2>

<b>accordion</b> <i>pathname</i> ?<i>options ...</i>

<hr>

<h2>Description</h2>

An <b>accordion</b> widget manages a collection of windows (called panes) and displays a single one at a time. Each slave window is associated with a button, which the user may select to change the currently-displayed window.

<h2>Command Options</h2>
<dl>
<dt><b>-height</b> <i>pixels</i>
<dd>Specifies the desired height of widget.
<dt><b>-speed</b> <i>speed</i>
<dd>Specifies the animation speed. Useful values range from 1 to around 20.
<dt><b>-width</b> <i>pixels</i>
<dd>Specifies the desired width of widget.
</dl>

<h2>Pane Options</h2>
<dl>
<dt><b>-compound</b> <i>pixels</i>
<dd>Specifies how to display the image relative to the text, in the case both <b>-text</b> and <b>-image</b> are present. Valid values are:
<dl>
<dt>text
<dd>Display text only.
<dt>image
<dd>Display image only.
<dt>center
<dd>Display text centered on top of image. 
<dt>top / bottom / left / right
<dd>Display image above, below, left of, or right of the text, respectively.
<dt>none
<dd>The default; display the image if present, otherwise the text.
</dl>
<dt><b>-image</b> <i>image</i>
<dd>Specifies an image to display. This is a list of 1 or more elements. The first element is the default image name. The rest of the list is a sequence of statespec / value pairs as per <b>style map</b>, specifying different images to use when the widget is in a particular state or combination of states. All images in the list should have the same size.
<dt><b>-text</b> <i>string</i>
<dd>Specifies a text string to be displayed inside the widget (unless overridden by <b>-textvariable</b>). 
<dt><b>-textvariable</b> <i>name</i>
<dd>Specifies the desired height of widget.
<dt><b>-underline</b> <i>index</i>
<dd>If set, specifies the integer index (0-based) of a character to underline in the text string. The underlined character is used for mnemonic activation.
</dl>

<h2>Pane Identifiers</h2>
The paneid argument to the following commands may take any of the following forms:
   *  An integer between zero and the number of paness;
   *  The name of a slave window;
   *  The literal string "current", which identifies the currently-selected tab; or:
   *  The literal string "end", which returns the number of tabs (only valid for "pathname index").

<h2>Widget Command</h2>

<dl>
<dt><i>pathname</i> <b>add</b> <i>window</i> ?<i>options ...</i>?
<dd>Adds a new tab to the notebook. See <b>Pane Options</b> for the list of available options.
<dt><i>pathname</i> <b>configure</b> ?<i>options</i>?
<dd>Query or modify the configuration options of the widget. If one or more <i>option-value</i> 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. If <i>option</i> is specified with no <i>value</i>, then the command returns a list describing the named option: the elements of the list are the option name, database name, database class, default value, and current value. If no <i>option</i> is specified, returns a list describing all of the available options for <i>pathName</i>.
<dt><i>pathname</i> <b>cget</b> <i>option</i>
<dd>Returns the current value of the configuration option given by <i>option</i>.
<dt><i>pathname</i> <b>forget</b> <i>paneid</i>
<dd>Removes the pane specified by <i>paneid</i>, unmaps and unmanages the associated window. 
<dt><i>pathname</i> <b>index</b> <i>paneid</i>
<dd>Returns the numeric index of the tab specified by <i>paneid</i>, or the total number of panes if <i>paneid</i> is the string "<b>end</b>". 
<dt><i>pathname</i> <b>insert</b> <i>pos</i> <i>window</i> ?<i>options ...</i>?
<dd>Inserts a pane at the specified position. <i>pos</i> is either the string <b>end</b>, an integer index, or the name of a managed subwindow. If <i>subwindow</i> is already managed by the notebook, moves it to the specified position. See <b>Pane Options</b> for the list of available options.
<dt><i>pathname</i> <b>pane</b> <i>paneid</i> ?<i>option</i> ?<i>value</i>?? ...
<dd>Query or modify the options of the specific pane. If no <i>-option</i> is specified, returns a dictionary of the tab option values. If one <i>-option</i> is specified, returns the value of that <i>option</i>. Otherwise, sets the <i>-options</i> to the corresponding <i>values</i>. See <b>Pane Options</b> for the list of available options.
<dt><i>pathname</i> <b>panes</b>
<dd>Returns the list of windows managed by the accordion.
<dt><i>pathname</i> <b>select</b> <i>paneid</i>
<dd>Selects the specified pane. The associated slave window will be displayed, and the previously-selected window (if different) is unmapped. If <i>paneid</i> is omitted, returns the widget name of the currently selected pane.
</dl>

Z 8d417427d86126dab173b728fc3fe1e0