.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Panedwindow 3" .TH Panedwindow 3 2023-07-25 "perl v5.38.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Tk::Panedwindow \- Create and manipulate Panedwindow widgets .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fR\f(CI$panedwindow\fR\fI\fR = \fI\fR\f(CI$parent\fR\fI\fR\->\fBPanedwindow\fR(?\fIoptions\fR?); .PP .Vb 3 \& \-background \-height \-width \& \-borderwidth \-orient \& \-cursor \-relief .Ve .SH "WIDGET-SPECIFIC OPTIONS" .IX Header "WIDGET-SPECIFIC OPTIONS" .IP "Option: \fB\-handlepad\fR" 4 .IX Item "Option: -handlepad" .PD 0 .IP "Name: \fBhandlePad\fR" 4 .IX Item "Name: handlePad" .IP "Class: \fBHandlePad\fR" 4 .IX Item "Class: HandlePad" .PD When sash handles are drawn, specifies the distance from the top or left end of the sash (depending on the orientation of the widget) at which to draw the handle. May be any value accepted by \fBTk_GetPixels\fR. .IP "Option: \fB\-handlesize\fR" 4 .IX Item "Option: -handlesize" .PD 0 .IP "Name: \fBhandleSize\fR" 4 .IX Item "Name: handleSize" .IP "Class: \fBHandleSize\fR" 4 .IX Item "Class: HandleSize" .PD Specifies the side length of a sash handle. Handles are always drawn as squares. May be any value accepted by \fBTk_GetPixels\fR. .IP "Option: \fB\-opaqueresize\fR" 4 .IX Item "Option: -opaqueresize" .PD 0 .IP "Name: \fBopaqueResize\fR" 4 .IX Item "Name: opaqueResize" .IP "Class: \fBOpaqueResize\fR" 4 .IX Item "Class: OpaqueResize" .PD Specifies whether panes should be resized as a sash is moved (true), or if resizing should be deferred until the sash is placed (false). .IP "Option: \fB\-sashcursor\fR" 4 .IX Item "Option: -sashcursor" .PD 0 .IP "Name: \fBsashCursor\fR" 4 .IX Item "Name: sashCursor" .IP "Class: \fBSashCursor\fR" 4 .IX Item "Class: SashCursor" .PD Mouse cursor to use when over a sash. If null, \&\fBsb_h_double_arrow\fR will be used for horizontal Panedwindows, and \&\fBsb_v_double_arrow\fR will be used for vertical Panedwindows. .IP "Option: \fB\-sashpad\fR" 4 .IX Item "Option: -sashpad" .PD 0 .IP "Name: \fBsashPad\fR" 4 .IX Item "Name: sashPad" .IP "Class: \fBSashPad\fR" 4 .IX Item "Class: SashPad" .PD Specifies the amount of padding to leave of each side of a sash. May be any value accepted by \fBTk_GetPixels\fR. .IP "Option: \fB\-sashrelief\fR" 4 .IX Item "Option: -sashrelief" .PD 0 .IP "Name: \fBsashRelief\fR" 4 .IX Item "Name: sashRelief" .IP "Class: \fBSashRelief\fR" 4 .IX Item "Class: SashRelief" .PD Relief to use when drawing a sash. May be any of the standard Tk relief values. .IP "Option: \fB\-sashwidth\fR" 4 .IX Item "Option: -sashwidth" .PD 0 .IP "Name: \fBsashWidth\fR" 4 .IX Item "Name: sashWidth" .IP "Class: \fBSashWidth\fR" 4 .IX Item "Class: SashWidth" .PD Specifies the width of each sash. May be any value accepted by \&\fBTk_GetPixels\fR. .IP "Option: \fB\-showhandle\fR" 4 .IX Item "Option: -showhandle" .PD 0 .IP "Name: \fBshowHandle\fR" 4 .IX Item "Name: showHandle" .IP "Class: \fBShowHandle\fR" 4 .IX Item "Class: ShowHandle" .PD Specifies whether sash handles should be shown. May be any valid boolean value. .SH DESCRIPTION .IX Header "DESCRIPTION" The \fBPanedwindow\fR method creates a new window (given by the \&\f(CW$panedwindow\fR argument) and makes it into a Panedwindow widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the Panedwindow such as its default background color and relief. .PP A Panedwindow widget contains any number of panes, arranged horizontally or vertically, according to the value of the \&\fB\-orient\fR option. Each pane contains one widget, and each pair of panes is separated by a moveable (via mouse movements) sash. Moving a sash causes the widgets on either side of the sash to be resized. .SH "WIDGET METHODS" .IX Header "WIDGET METHODS" The \fBPanedwindow\fR method may be used to invoke various operations on the widget. It has the following general form: .PP .Vb 1 \& $widget\->method(?arg arg ...?); .Ve .PP The following commands are possible for Panedwindow widgets: .ie n .IP "\fR\fI$widget\fR\fI\fR\->\fBadd\fR(?window ...? ?option value ...?);" 4 .el .IP "\fR\f(CI$widget\fR\fI\fR\->\fBadd\fR(?window ...? ?option value ...?);" 4 .IX Item "$widget->add(?window ...? ?option value ...?);" Add one or more windows to the Panedwindow, each in a separate pane. The arguments consist of the names of one or more windows followed by pairs of arguments that specify how to manage the windows. \&\fIOption\fR may have any of the values accepted by the \&\fBconfigure\fR subcommand. .ie n .IP \fR\fI$widget\fR\fI\fR\->\fBcget\fR(\fIoption\fR); 4 .el .IP \fR\f(CI$widget\fR\fI\fR\->\fBcget\fR(\fIoption\fR); 4 .IX Item "$widget->cget(option);" Returns the current value of the configuration option given by \&\fIoption\fR. \fIOption\fR may have any of the values accepted by the \&\fBPanedwindow\fR command. .ie n .IP "\fR\fI$widget\fR\fI\fR\->\fBconfigure\fR(\fI?option?, ?value, option, value, ...?\fR);" 4 .el .IP "\fR\f(CI$widget\fR\fI\fR\->\fBconfigure\fR(\fI?option?, ?value, option, value, ...?\fR);" 4 .IX Item "$widget->configure(?option?, ?value, option, value, ...?);" Query or modify the configuration options of the widget. If no \&\fIoption\fR is specified, returns a list describing all of the available options for \f(CW$widget\fR (see Tk::configure for information on the format of this list). If \fIoption\fR is specified with no \fIvalue\fR, 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 \fIoption\fR is specified). If one or more \fIoption-value\fR 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. \fIOption\fR may have any of the values accepted by the \fBPanedwindow\fR command. .ie n .IP "\fR\fI$widget\fR\fI\fR\->\fBforget\fR(?window ...?);" 4 .el .IP "\fR\f(CI$widget\fR\fI\fR\->\fBforget\fR(?window ...?);" 4 .IX Item "$widget->forget(?window ...?);" Remove the pane containing \f(CW$widget\fR from the Panedwindow. All geometry management options for \f(CW$widget\fR will be forgotten. .ie n .IP "\fR\fI$widget\fR\fI\fR\->\fBidentify\fR(\fIx, y\fR);" 4 .el .IP "\fR\f(CI$widget\fR\fI\fR\->\fBidentify\fR(\fIx, y\fR);" 4 .IX Item "$widget->identify(x, y);" Identify the Panedwindow component underneath the point given by \&\fIx\fR and \fIy\fR, in window coordinates. If the point is over a sash or a sash handle, the result is a two element list containing the index of the sash or handle, and a word indicating whether it is over a sash or a handle, such as [0, 'sash'] or [2, 'handle']. If the point is over any other part of the Panedwindow, the result is an empty list. .ie n .IP \fR\fI$widget\fR\fI\fR\->\fBproxy\fR(\fI?args?\fR); 4 .el .IP \fR\f(CI$widget\fR\fI\fR\->\fBproxy\fR(\fI?args?\fR); 4 .IX Item "$widget->proxy(?args?);" This command is used to query and change the position of the sash proxy, used for rubberband-style pane resizing. It can take any of the following forms: .RS 4 .ie n .IP \fR\fI$widget\fR\fI\fR\->\fBproxyCoord\fR; 4 .el .IP \fR\f(CI$widget\fR\fI\fR\->\fBproxyCoord\fR; 4 .IX Item "$widget->proxyCoord;" Return a list containing the x and y coordinates of the most recent proxy location. .ie n .IP \fR\fI$widget\fR\fI\fR\->\fBproxyForget\fR; 4 .el .IP \fR\f(CI$widget\fR\fI\fR\->\fBproxyForget\fR; 4 .IX Item "$widget->proxyForget;" Remove the proxy from the display. .ie n .IP "\fR\fI$widget\fR\fI\fR\->\fBproxyPlace\fR(\fIx, y\fR);" 4 .el .IP "\fR\f(CI$widget\fR\fI\fR\->\fBproxyPlace\fR(\fIx, y\fR);" 4 .IX Item "$widget->proxyPlace(x, y);" Place the proxy at the given \fIx\fR and \fIy\fR coordinates. .RE .RS 4 .RE .ie n .IP \fR\fI$widget\fR\fI\fR\->\fBsash\fR(\fI?args?\fR); 4 .el .IP \fR\f(CI$widget\fR\fI\fR\->\fBsash\fR(\fI?args?\fR); 4 .IX Item "$widget->sash(?args?);" This command is used to query and change the position of sashes in the Panedwindow. It can take any of the following forms: .RS 4 .ie n .IP \fR\fI$widget\fR\fI\fR\->\fBsashCoord\fR(\fIindex\fR); 4 .el .IP \fR\f(CI$widget\fR\fI\fR\->\fBsashCoord\fR(\fIindex\fR); 4 .IX Item "$widget->sashCoord(index);" Return the current x and y coordinate pair for the sash given by \&\fIindex\fR. \fIIndex\fR must be an integer between 0 and 1 less than the number of panes in the Panedwindow. The coordinates given are those of the top left corner of the region containing the sash. \&\fR\f(CI$widget\fR\fI\fR\->\fBsashDragto\fR(\fIindex, x, y\fR) This command computes the difference between the given coordinates and the coordinates given to the last \fBsash coord\fR command for the given sash. It then moves that sash the computed difference. The return value is the empty string. .ie n .IP "\fR\fI$widget\fR\fI\fR\->\fBsashMark\fR(\fIindex, x, y\fR);" 4 .el .IP "\fR\f(CI$widget\fR\fI\fR\->\fBsashMark\fR(\fIindex, x, y\fR);" 4 .IX Item "$widget->sashMark(index, x, y);" Records \fIx\fR and \fIy\fR for the sash given by \fIindex\fR; used in conjunction with later dragto commands to move the sash. .ie n .IP "\fR\fI$widget\fR\fI\fR\->\fBsashPlace\fR(\fIindex, x, y\fR);" 4 .el .IP "\fR\f(CI$widget\fR\fI\fR\->\fBsashPlace\fR(\fIindex, x, y\fR);" 4 .IX Item "$widget->sashPlace(index, x, y);" Place the sash given by \fIindex\fR at the given coordinates. .RE .RS 4 .RE .ie n .IP "$widget \fR\fI$widget\fR\fI\fR\->\fBpanecget\fR(option);" 4 .el .IP "\f(CW$widget\fR \fR\f(CI$widget\fR\fI\fR\->\fBpanecget\fR(option);" 4 .IX Item "$widget $widget->panecget(option);" Query a management option for \f(CW$widget\fR. \fIOption\fR may be any value allowed by the \fBpaneconfigure\fR subcommand. .ie n .IP "$widget \fR\fI$widget\fR\fI\fR\->\fBpaneconfigure\fR(?option? ?value option value ...?);" 4 .el .IP "\f(CW$widget\fR \fR\f(CI$widget\fR\fI\fR\->\fBpaneconfigure\fR(?option? ?value option value ...?);" 4 .IX Item "$widget $widget->paneconfigure(?option? ?value option value ...?);" Query or modify the management options for \f(CW$widget\fR. If no \&\fIoption\fR is specified, returns a list describing all of the available options for \f(CW$widget\fR (see Tk::configure for information on the format of this list). If \fIoption\fR is specified with no \fIvalue\fR, 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 \fIoption\fR is specified). If one or more \fIoption-value\fR 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. The following options are supported: .RS 4 .ie n .IP "\fB\-after\fR => $widget" 4 .el .IP "\fB\-after\fR => \f(CW$widget\fR" 4 .IX Item "-after => $widget" Insert the window after the window specified. \f(CW$widget\fR should be the name of a window already managed by \f(CW$widget\fR. .ie n .IP "\fB\-before\fR => $widget" 4 .el .IP "\fB\-before\fR => \f(CW$widget\fR" 4 .IX Item "-before => $widget" Insert the window before the window specified. \f(CW$widget\fR should be the name of a window already managed by \f(CW$widget\fR. .IP "\fB\-height\fR => \fIsize\fR" 4 .IX Item "-height => size" Specify a height for the window. The height will be the outer dimension of the window including its border, if any. If \fIsize\fR is an empty string, or if \fB\-height\fR is not specified, then the height requested internally by the window will be used initially; the height may later be adjusted by the movement of sashes in the Panedwindow. \fISize\fR may be any value accepted by \fBTk_GetPixels\fR. .IP "\fB\-minsize\fR => \fIn\fR" 4 .IX Item "-minsize => n" Specifies that the size of the window cannot be made less than \&\fIn\fR. This constraint only affects the size of the widget in the paned dimension \-\- the x dimension for horizontal Panedwindows, the y dimension for vertical Panedwindows. May be any value accepted by \&\fBTk_GetPixels\fR. .IP "\fB\-padx\fR => \fIn\fR" 4 .IX Item "-padx => n" Specifies a non-negative value indicating how much extra space to leave on each side of the window in the X\-direction. The value may have any of the forms accepted by \fBTk_GetPixels\fR. .IP "\fB\-pady\fR => \fIn\fR" 4 .IX Item "-pady => n" Specifies a non-negative value indicating how much extra space to leave on each side of the window in the Y\-direction. The value may have any of the forms accepted by \fBTk_GetPixels\fR. .IP "\fB\-sticky\fR => \fIstyle\fR" 4 .IX Item "-sticky => style" If a window's pane is larger than the requested dimensions of the window, this option may be used to position (or stretch) the window within its pane. \fIStyle\fR is a string that contains zero or more of the characters \fBn\fR, \fBs\fR, \fBe\fR or \fBw\fR. The string can optionally contains spaces or commas, but they are ignored. Each letter refers to a side (north, south, east, or west) that the window will "stick" to. If both \fBn\fR and \fBs\fR (or \fBe\fR and \fBw\fR) are specified, the window will be stretched to fill the entire height (or width) of its cavity. .IP "\fB\-width\fR => \fIsize\fR" 4 .IX Item "-width => size" Specify a width for the window. The width will be the outer dimension of the window including its border, if any. If \fIsize\fR is an empty string, or if \fB\-width\fR is not specified, then the width requested internally by the window will be used initially; the width may later be adjusted by the movement of sashes in the Panedwindow. \fISize\fR may be any value accepted by \fBTk_GetPixels\fR. .RE .RS 4 .RE .ie n .IP \fR\fI$widget\fR\fI\fR\->\fBpanes\fR; 4 .el .IP \fR\f(CI$widget\fR\fI\fR\->\fBpanes\fR; 4 .IX Item "$widget->panes;" Returns an ordered list of the widgets managed by \f(CW$widget\fR. .SH "RESIZING PANES" .IX Header "RESIZING PANES" A pane is resized by grabbing the sash (or sash handle if present) and dragging with the mouse. This is accomplished via mouse motion bindings on the widget. When a sash is moved, the sizes of the panes on each side of the sash, and thus the widgets in those panes, are adjusted. .PP When a pane is resized from outside (eg, it is packed to expand and fill, and the containing toplevel is resized), space is added to the final (rightmost or bottommost) pane in the window. .SH KEYWORDS .IX Header "KEYWORDS" Panedwindow, widget, geometry management