iwidgets::panedwindow(1)
β¨ iwidgets::panedwindow β the [incr Widgets] manual, but make it make sense β¨
okay bestie, welcome to the panedwindow page π this is from the [incr Widgets] corner of the Tk manual and it's genuinely iconic once you get it. sit down, grab a snack π
πΈ NAME πΈ
iwidgets::panedwindow β create and manipulate a paned window widget. that's the whole vibe. no cap.
π SYNOPSIS π
iwidgets::panedwindow pathName ?options?
π¦ INHERITANCE π¦
itk::Widget <- iwidgets::Panedwindow
it's giving legacy. it's giving itk royalty. π
β STANDARD OPTIONS β
backgroundcursor
if you want the whole tea on those, go read the "options" manual entry, it's all there fr fr.
π WIDGET-SPECIFIC OPTIONS π
okay this is the good part, the options that are hers specifically.
- Name:
heightβ Class:Heightβ Command-Line Switch:-height
specifies the overall height of the paned window, in any of the forms acceptable to Tk_GetPixels. the default is 10 pixels.
- Name:
orientβ Class:Orientβ Command-Line Switch:-orient
specifies the orientation of the separators: vertical or horizontal. the default is horizontal.
- Name:
sashBorderWidthβ Class:BorderWidthβ Command-Line Switch:-sashborderwidth
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 Tk_GetPixels. the default is 2 pixels.
- Name:
sashCursorβ Class:Cursorβ Command-Line Switch:-sashcursor
specifies the type of cursor to be displayed in the sash. the default is crosshair.
- Name:
sashHeightβ Class:Heightβ Command-Line Switch:-sashheight
specifies the height of the sash, in any of the forms acceptable to Tk_GetPixels. the default is 10 pixels.
- Name:
sashIndentβ Class:SashIndentβ Command-Line Switchsashindent
specifies the placement of the sash along the panes, in any of the 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.
heads up: yes, that command-line switch is written sashindent with no leading dash up there. that's just how it's listed, don't @ me π
- Name:
sashWidthβ Class:Widthβ Command-Line Switch:-sashwidth
specifies the width of the sash, in any of the forms acceptable to Tk_GetPixels. the default is 10 pixels.
- Name:
showHandleβ Class:ShowHandleβ Command-Line Switch:-showhandle
specifies whether or not to display the sashes on the window panes. the default is 1, and valid options are 0 and 1.
- Name:
thicknessβ Class:Thicknessβ Command-Line Switch:-thickness
specifies the thickness of the separators, in any of the forms acceptable to Tk_GetPixels. the default is 3 pixels.
- Name:
widthβ Class:Widthβ Command-Line Switch:-width
specifies the overall width of the paned window, in any of the forms acceptable to Tk_GetPixels. the default is 10 pixels.
π DESCRIPTION π
the iwidgets::panedwindow command creates a multiple paned window widget that can orient its panes either vertically or horizontally. every pane is itself a frame, acting as a child site for other widgets. and the border separating each pane? it contains a sash which lets the user position the panes relative to one another. it's giving flexible layout main character energy π«Ά
π METHODS π
the iwidgets::panedwindow command creates a new Tcl command whose name is pathName. you use that command to invoke various operations on the widget. the general form is:
pathName option ?arg arg ...?
option and the args decide the exact behavior of the command. slay.
a lot of the widget commands for the panedwindow take an argument that's an indicator of which pane of the paned window to operate on. these indicators are called indexes, and they let you reference and manipulate panes no matter what their current map state is. paned window indexes can be specified in any of these forms:
numberβ specifies the pane numerically, where0corresponds 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 ofTcl_StringMatchare 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:
-margin valueβ specifies the border distance between the pane and pane contents, in any of the forms acceptable toTk_GetPixels. the default is 8 pixels.-minimum valueβ specifies the minimum size that a pane's contents may reach, not inclusive of twice the margin, in any of the forms acceptable toTk_GetPixels. the default is 10 pixels.
the add method returns the path name of the pane.
pathName cget option
returns the current value of the configuration option given by option. option may have any of the values accepted by the iwidgets::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 iwidgets::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. math girlies rise π₯
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 π
dynamic changing of the margin and or minimum options to values which make the current configuration invalid will block subsequent 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. so like. breathe. it's fine πΈ
π§ EXAMPLE π§
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
copy paste, run it, watch it eat π
π ACKNOWLEDGEMENTS π
shoutout to the OGs, periodt:
- Jay Schmidgall
- 1994 - Base logic posted to
comp.lang.tcl
- 1994 - Base logic posted to
- Joe Hidebrand
<hildjj@fuentez.com>- 07/25/94 - Posted first multipane version to
comp.lang.tcl - 07/28/94 - Added support for vertical panes
- 07/25/94 - Posted first multipane version to
- Ken Copeland
<ken@hilco.com>- 09/28/95 - Smoothed out the sash movement and added squeezable panes.
they really said "let me cook" and cooked π«Ά
β¨ AUTHOR β¨
Mark L. Ulferts
π₯ KEYWORDS π₯
panedwindow, widget
and that's the whole page bestie, you're officially a panedwindow girlie now π this came to you straight from the Tk manual set, filed under iwidgets::panedwindow(1) β go build something gorgeous with it, mwah πβ¨
π¦ where this page comes from
- debian bookworm: iwidgets4-doc 4.1.1-2.1
- debian trixie: iwidgets4-doc 4.1.1-4
- ubuntu jammy: iwidgets4-doc 4.1.1-2.1
- ubuntu noble: iwidgets4-doc 4.1.1-2.1
- ubuntu resolute: iwidgets4-doc 4.1.1-4
- ubuntu stonking: iwidgets4-doc 4.1.1-4
- Copyright (c) 1995 DSC Technologies Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms