panedwindow - Create and manipulate a paned window widget

SYNOPSIS

panedwindow pathName ?options?

INHERITANCE

itk::Widget <- panedwindow

STANDARD OPTIONS

background
cursor

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

WIDGET-SPECIFIC OPTIONS

Name:                   height
Class:                  Height
Command-Line Switch:	-height

Name:                   orient
Class:                  Orient
Command-Line Switch:	-orient

Name:                   sashBorderWidth
Class:                  BorderWidth
Command-Line Switch:	-sashborderwidth

Name:                   sashCursor
Class:                  Cursor
Command-Line Switch:	-sashcursor

Name:                   sashHeight
Class:                  Height
Command-Line Switch:	-sashheight

Name:                   sashIndent
Class:                  SashIndent
Command-Line Switch 	sashindent

Name:                   sashWidth
Class:                  Width
Command-Line Switch:	-sashwidth

Name:                   showHandle
Class:                  ShowHandle
Command-Line Switch:	-showhandle

Name:                   thickness
Class:                  Thickness
Command-Line Switch:	-thickness

Name:                   width
Class:                  Width
Command-Line Switch:	-width


DESCRIPTION

The panedwindow command creates a multiple paned window widget capable of orienting the panes either vertically or horizontally. Each pane is itself a frame acting as a child site for other widgets. The border separating each pane contains a sash which allows user positioning of the panes relative to one another.

METHODS

The panedwindow command creates a new Tcl command whose name is pathName. This command may be used to invoke various operations on the widget. It has the following general form:

pathName option ?arg arg ...?
Option and the args determine the exact behavior of the command.

Many of the widget commands for the panedwindow take as one argument an indicator of which pane of the paned window to operate on. These indicators are called indexes and allow reference and manipulation of panes regardless of their current map state. Paned window indexes may be specified in any of the following forms:

number
Specifies the pane numerically, where 0 corresponds to the nearest (top/left-most) pane of the paned window.
end
Indicates the farthest (bottom/right-most) pane of the paned window.
pattern
If the index doesn't satisfy one of the above forms then this form is used. Pattern is pattern-matched against the tag of each pane in the panedwindow, in order from left/top to right/left, until a matching entry is found. The rules of Tcl_StringMatch are used.

WIDGET-SPECIFIC METHODS

pathName add tag ?option value option value?
Adds a new pane to the paned window on the far side (right/bottom). The following options may be specified:
pathName cget option
Returns the current value of the configuration option given by option. Option may have any of the values accepted by the panedwindow command.
pathName childsite ?index?
Returns a list of the child site path names or a specific child site given an index. The list is constructed from the near side (left/top) to the far side (right/bottom).
pathName configure ?option? ?value option value ...?
Query or modify the configuration options of the widget. If no option is specified, returns a list describing all of the available options for pathName (see Tk_ConfigureInfo 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. Option may have any of the values accepted by the panedwindow command.
pathName delete index
Deletes a specified pane given an index.
pathName fraction percentage percentage ?percentage percentage ...?
Sets the visible percentage of the panes. Specifies a set of percentages which are applied to the visible panes from the near side (left/top). The number of percentages must be equal to the current number of visible (mapped) panes and add up to 100.
pathName hide index
Changes the visiblity of the specified pane, allowing a previously displayed pane to be visually removed rather than deleted.
pathName index index
Returns the numerical index corresponding to index.
pathName insert index tag ?option value option value ...?
Same as the add command except that it inserts the new pane just before the one given by index, instead of appending to the end of the panedwindow. The option, and value arguments have the same interpretation as for the add widget command.
pathName paneconfigure index ?options?
This command is similar to the configure command, except that it applies to the options for an individual pane, whereas configure applies to the options for the paned window as a whole. Options 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 entry index (see Tk_ConfigureInfo for information on the format of this list).
pathName reset
Redisplays the pane window using default percentages.
pathName show index
Changes the visiblity of the specified pane, allowing a previously hidden pane to be displayed.

NOTES

EXAMPLE

 panedwindow .pw -width 300 -height 300 
 .pw add top
 .pw add middle -margin 10
 .pw add bottom -margin 10 -minimum 10

 pack .pw -fill both -expand yes

 foreach pane [.pw childSite] {
    button $pane.b -text $pane -relief raised -borderwidth 2
    pack $pane.b -fill both -expand yes
 }

 .pw fraction 50 30 20
 .pw paneconfigure 0 -minimum 20
 .pw paneconfigure bottom -margin 15

ACKNOWLEDGEMENTS:

Jay Schmidgall

Joe Hidebrand <hildjj@fuentez.com>

Ken Copeland <ken@hilco.com>

AUTHOR

Mark L. Ulferts

KEYWORDS

panedwindow, widget