![]() | ActiveTcl User Guide | ![]() |
iwidgets::panedwindow - Create and manipulate a paned window wid-
get
iwidgets::panedwindow pathName ?options?
itk::Widget <- iwidgets::Panedwindow
options.
forms acceptable to Tk_GetPixels. The default is 10 pixels.
tal. The default is horizontal.
around the outside of the sash in any of the forms acceptable to
default is crosshair.
to Tk_GetPixels. The default is 10 pixels.
forms acceptable to Tk_GetPixels. 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.
panes. The default is 1, and valid options are 0 and 1.
acceptable to Tk_GetPixels. The default is 3 pixels.
forms acceptable to Tk_GetPixels. The default is 10 pixels. _________________________________________________________________
widget capable of orienting the panes either vertically or hori- zontally. 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.
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 ...?
ment 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.
forms:
pathName add tag ?option value option value?
tom). The following options may be specified:
-margin value
is any of the forms acceptable to Tk_GetPixels. The default is 8
pixels.
-minimum value
inclusive of twice the margin in any of the forms acceptable to
pathName cget option
option. Option may have any of the values accepted by the iwid-
gets::panedwindow command.
pathName childsite ?index?
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 ...?
option is specified, returns a list describing all of the avail-
able 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 iwidgets::panedwindow command.
pathName delete index
pathName fraction percentage percentage ?percentage percentage
...?
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
ously displayed pane to be visually removed rather than deleted.
pathName index index
pathName insert index tag ?option value option value ...?
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?
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.
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
pathName show index
ously hidden pane to be displayed.
which 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 com- pressed 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.
package require Iwidgets 4.0
iwidgets::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
1994 - Base logic posted to comp.lang.tcl
07/25/94 - Posted first multipane version to comp.lang.tcl
07/28/94 - Added support for vertical panes
09/28/95 - Smoothed out the sash movement and added squeezable
panes.
panedwindow, widget