NAME
iwidgets::panedwindow - Create and manipulate a paned window widget
SYNOPSIS
iiwwiiddggeettss::::ppaanneeddwwiinnddooww pathName ?options? IINNHHEERRIITTAANNCCEEitk::Widget <- iwidgets::Panedwindow
SSTTAANNDDAARRDD OOPPTTIIOONNSS bbaacckkggrroouunndd ccuurrssoorr See the "options" manual entry for details on the standard options.WWIIDDGGEETT-SSPPEECCIIFFIICC OOPPTTIIOONNSS
Name: hheeiigghhtt Class: HHeeiigghhttCommand-Line Switch: -hheeiigghhtt
Specifies the overall height of the paned window in any of the forms acceptable to TTkkGGeettPPiixxeellss. The default is 10 pixels. Name: oorriieenntt Class: OOrriieennttCommand-Line Switch: -oorriieenntt
Specifies the orientation of the separators: vveerrttiiccaall or hhoorrii-
zzoonnttaall. The default is horizontal. Name: ssaasshhBBoorrddeerrWWiiddtthh Class: BBoorrddeerrWWiiddtthhCommand-Line Switch: -ssaasshhbboorrddeerrwwiiddtthh
Specifies a value indicating the width of the 3-D border to draw
around the outside of the sash in any of the forms acceptable to TTkkGGeettPPiixxeellss. The default is 2 pixels. Name: ssaasshhCCuurrssoorr Class: CCuurrssoorrCommand-Line Switch: -ssaasshhccuurrssoorr
Specifies the type of cursor to be displayed in the sash. The default is crosshair. Name: ssaasshhHHeeiigghhtt Class: HHeeiigghhttCommand-Line Switch: -ssaasshhhheeiigghhtt
Specifies the height of the sash in any of the forms acceptable to TTkkGGeettPPiixxeellss. The default is 10 pixels. Name: ssaasshhIInnddeenntt Class: SSaasshhIInnddeennttCommand-Line Switch ssaasshhiinnddeenntt
Specifies the placement of the sash along the panes in any of the forms acceptable to TTkkGGeettPPiixxeellss. A positive value causes the sash to be offset from the near (left/top) side of the pane, and a negative value causes the sash to be offset from the far (right/bottom) side. If the offset is greater than the width, then the sash is placed flush against the side. The default is-10 pixels.
Name: ssaasshhWWiiddtthh Class: WWiiddtthhCommand-Line Switch: -ssaasshhwwiiddtthh
Specifies the width of the sash in any of the forms acceptable to TTkkGGeettPPiixxeellss. The default is 10 pixels. Name: sshhoowwHHaannddllee Class: SShhoowwHHaannddlleeCommand-Line Switch: -sshhoowwhhaannddllee
Specifies whether or not to display the sashes on the window panes. The default is 1, and valid options are 0 and 1. Name: tthhiicckknneessss Class: TThhiicckknneessssCommand-Line Switch: -tthhiicckknneessss
Specifies the thickness of the separators in any of the forms acceptable to TTkkGGeettPPiixxeellss. The default is 3 pixels. Name: wwiiddtthh Class: WWiiddtthhCommand-Line Switch: -wwiiddtthh
Specifies the overall width of the paned window in any of the forms acceptable to TTkkGGeettPPiixxeellss. The default is 10 pixels.DESCRIPTION
The iiwwiiddggeettss::::ppaanneeddwwiinnddooww command creates a multiple paned window wid-
get 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 posi-
tioning of the panes relative to one another. MMEETTHHOODDSS The iiwwiiddggeettss::::ppaanneeddwwiinnddooww 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 ppaanneeddwwiinnddooww take as one argument anindicator of which pane of the paned window to operate on. These indi-
cators 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 thenearest (top/left-most) pane of the paned window.
eenndd Indicates the farthest (bottom/right-most) pane of the
paned window. pattern If the index doesn't satisfy one of the above forms thenthis 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 TTccllSSttrriinnggMMaattcchh are used.WWIIDDGGEETT-SSPPEECCIIFFIICC MMEETTHHOODDSS
pathName aadddd tag ?option value option value?Adds a new pane to the paned window on the far side (right/bot-
tom). The following options may be specified:-mmaarrggiinn value
Specifies the border distance between the pane and pane contents is any of the forms acceptable to TTkkGGeettPPiixxeellss. The default is 8 pixels.-mmiinniimmuumm value
Specifies the minimum size that a pane's contents may reach not inclusive of twice the margin in any of theforms acceptable to TTkkGGeettPPiixxeellss. The default is 10 pix-
els. The aadddd method returns the path name of the pane. pathName ccggeett option Returns the current value of the configuration option given byoption. Option may have any of the values accepted by the iiwwiidd-
ggeettss::::ppaanneeddwwiinnddooww command. pathName cchhiillddssiittee ?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 ccoonnffiigguurree ?option? ?value option value ...? Query or modify the configuration options of the widget. If nooption is specified, returns a list describing all of the avail-
able options for pathName (see TTkkCCoonnffiigguurreeIInnffoo 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 ormore 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 iiwwiiddggeettss::::ppaanneeddwwiinnddooww command. pathName ddeelleettee index Deletes a specified pane given an index. pathName ffrraaccttiioonn 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 hhiiddee indexChanges the visiblity of the specified pane, allowing a previ-
ously displayed pane to be visually removed rather than deleted. pathName iinnddeexx index Returns the numerical index corresponding to index. pathName iinnsseerrtt index tag ?option value option value ...? Same as the aadddd 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 aadddd widget command. pathName ppaanneeccoonnffiigguurree index ?options? This command is similar to the ccoonnffiigguurree command, except that it applies to the options for an individual pane, whereas ccoonnffiigguurree applies to the options for the paned window as a whole. Options may have any of the values accepted by the aadddd 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 TTkkCCoonnffiigguurreeIInnffoo for information on the format of this list). pathName rreesseett Redisplays the pane window using default percentages. pathName sshhooww indexChanges the visiblity of the specified pane, allowing a previ-
ously hidden pane to be displayed. NNOOTTEESS Dynamic changing of the margin and or minimum options to valueswhich make the current configuration invalid will block subse-
quent sash movement until the fractions are modified via the fraction method. For example a panedwindow is created with three panes and the minimum and margin options are at their default settings. Next the user moves the sashes to compact the panes to one side. Now, if the minimum is increased on the most compressed pane via the paneconfigure method to a large enough value, then sash movement is blocked until the fractions are adjusted. This situation is unusual and under normal operation of the panedwindow, this problem will never occur. EEXXAAMMPPLLEE package require Iwidgets 4.0iwidgets::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
AACCKKNNOOWWLLEEDDGGEEMMEENNTTSS:: Jay Schmidgall1994 - Base logic posted to comp.lang.tcl
Joe Hidebrand07/25/94 - Posted first multipane version to comp.lang.tcl
07/28/94 - Added support for vertical panes
Ken Copeland09/28/95 - Smoothed out the sash movement and added squeezable
panes. AUTHOR Mark L. Ulferts KKEEYYWWOORRDDSS panedwindow, widget Tk iwidgets::panedwindow(1)