1panedwindow(n) Tk Built-In Commands panedwindow(n)
2
3
4
5______________________________________________________________________________
6
8 panedwindow - Create and manipulate panedwindow widgets
9
11 panedwindow pathName ?options?
12
14 -background -height -width
15 -borderwidth -orient
16 -cursor -relief
17
18 See the options manual entry for details on the standard options.
19
21 [-handlepad handlePad] When sash handles are drawn, specifies the dis‐
22 tance from the top or left end of the sash (depending on the orienta‐
23 tion of the widget) at which to draw the handle. May be any value
24 accepted by Tk_GetPixels. [-handlesize handleSize] Specifies the side
25 length of a sash handle. Handles are always drawn as squares. May be
26 any value accepted by Tk_GetPixels. [-opaqueresize opaqueResize] Spec‐
27 ifies whether panes should be resized as a sash is moved (true), or if
28 resizing should be deferred until the sash is placed (false).
29 [-sashcursor sashCursor] Mouse cursor to use when over a sash. If
30 null, sb_h_double_arrow will be used for horizontal panedwindows, and
31 sb_v_double_arrow will be used for vertical panedwindows. [-sash‐
32 pad sashPad] Specifies the amount of padding to leave of each side of a
33 sash. May be any value accepted by Tk_GetPixels. [-sashrelief sashRe‐
34 lief] Relief to use when drawing a sash. May be any of the standard Tk
35 relief values. [-sashwidth sashWidth] Specifies the width of each
36 sash. May be any value accepted by Tk_GetPixels. [-showhan‐
37 dle showHandle] Specifies whether sash handles should be shown. May be
38 any valid Tcl boolean value.
39_________________________________________________________________
40
41
43 The panedwindow command creates a new window (given by the pathName
44 argument) and makes it into a panedwindow widget. Additional options,
45 described above, may be specified on the command line or in the option
46 database to configure aspects of the panedwindow such as its default
47 background color and relief. The panedwindow command returns the path
48 name of the new window.
49
50 A panedwindow widget contains any number of panes, arranged horizon‐
51 tally or vertically, according to the value of the -orient option.
52 Each pane contains one widget, and each pair of panes is separated by a
53 moveable (via mouse movements) sash. Moving a sash causes the widgets
54 on either side of the sash to be resized.
55
57 The panedwindow command creates a new Tcl command whose name is the
58 same as the path name of the panedwindow's window. This command may be
59 used to invoke various operations on the widget. It has the following
60 general form:
61 pathName option ?arg arg ...?
62 PathName is the name of the command, which is the same as the panedwin‐
63 dow widget's path name. Option and the args determine the exact behav‐
64 ior of the command. The following commands are possible for panedwin‐
65 dow widgets:
66
67 pathName add window ?window ...? ?option value ...?
68 Add one or more windows to the panedwindow, each in a separate
69 pane. The arguments consist of the names of one or more windows
70 followed by pairs of arguments that specify how to manage the
71 windows. Option may have any of the values accepted by the con‐
72 figure subcommand.
73
74 pathName cget option
75 Returns the current value of the configuration option given by
76 option. Option may have any of the values accepted by the
77 panedwindow command.
78
79 pathName configure ?option? ?value option value ...?
80 Query or modify the configuration options of the widget. If no
81 option is specified, returns a list describing all of the avail‐
82 able options for pathName (see Tk_ConfigureInfo for information
83 on the format of this list). If option is specified with no
84 value, then the command returns a list describing the one named
85 option (this list will be identical to the corresponding sublist
86 of the value returned if no option is specified). If one or
87 more option-value pairs are specified, then the command modifies
88 the given widget option(s) to have the given value(s); in this
89 case the command returns an empty string. Option may have any of
90 the values accepted by the panedwindow command.
91
92 pathName forget window ?window ...?
93 Remove the pane containing window from the panedwindow. All
94 geometry management options for window will be forgotten.
95
96 pathName identify x y
97 Identify the panedwindow component underneath the point given by
98 x and y, in window coordinates. If the point is over a sash or
99 a sash handle, the result is a two element list containing the
100 index of the sash or handle, and a word indicating whether it is
101 over a sash or a handle, such as {0 sash} or {2 handle}. If the
102 point is over any other part of the panedwindow, the result is
103 an empty list.
104
105 pathName proxy ?args?
106 This command is used to query and change the position of the
107 sash proxy, used for rubberband-style pane resizing. It can take
108 any of the following forms:
109
110 pathName proxy coord
111 Return a list containing the x and y coordinates of the
112 most recent proxy location.
113
114 pathName proxy forget
115 Remove the proxy from the display.
116
117 pathName proxy place x y
118 Place the proxy at the given x and y coordinates.
119
120 pathName sash ?args?
121 This command is used to query and change the position of sashes
122 in the panedwindow. It can take any of the following forms:
123
124 pathName sash coord index
125 Return the current x and y coordinate pair for the sash
126 given by index. Index must be an integer between 0 and 1
127 less than the number of panes in the panedwindow. The
128 coordinates given are those of the top left corner of the
129 region containing the sash.
130
131 pathName sash dragto index x y
132 This command computes the difference between the given
133 coordinates and the coordinates given to the last sash
134 mark command for the given sash. It then moves that sash
135 the computed difference. The return value is the empty
136 string.
137
138 pathName sash mark index x y
139 Records x and y for the sash given by index; used in con‐
140 junction with later sash dragto commands to move the
141 sash.
142
143 pathName sash place index x y
144 Place the sash given by index at the given coordinates.
145
146 pathName panecget window option
147 Query a management option for window. Option may be any value
148 allowed by the paneconfigure subcommand.
149
150 pathName paneconfigure window ?option? ?value option value ...?
151 Query or modify the management options for window. If no option
152 is specified, returns a list describing all of the available
153 options for pathName (see Tk_ConfigureInfo for information on
154 the format of this list). If option is specified with no value,
155 then the command returns a list describing the one named option
156 (this list will be identical to the corresponding sublist of the
157 value returned if no option is specified). If one or more
158 option-value pairs are specified, then the command modifies the
159 given widget option(s) to have the given value(s); in this case
160 the command returns an empty string. The following options are
161 supported:
162
163 -after window
164 Insert the window after the window specified. window
165 should be the name of a window already managed by path‐
166 Name.
167
168 -before window
169 Insert the window before the window specified. window
170 should be the name of a window already managed by path‐
171 Name.
172
173 -height size
174 Specify a height for the window. The height will be the
175 outer dimension of the window including its border, if
176 any. If size is an empty string, or if -height is not
177 specified, then the height requested internally by the
178 window will be used initially; the height may later be
179 adjusted by the movement of sashes in the panedwindow.
180 Size may be any value accepted by Tk_GetPixels.
181
182 -minsize n
183 Specifies that the size of the window cannot be made less
184 than n. This constraint only affects the size of the
185 widget in the paned dimension -- the x dimension for hor‐
186 izontal panedwindows, the y dimension for vertical paned‐
187 windows. May be any value accepted by Tk_GetPixels.
188
189 -padx n
190 Specifies a non-negative value indicating how much extra
191 space to leave on each side of the window in the X-direc‐
192 tion. The value may have any of the forms accepted by
193 Tk_GetPixels.
194
195 -pady n
196 Specifies a non-negative value indicating how much extra
197 space to leave on each side of the window in the Y-direc‐
198 tion. The value may have any of the forms accepted by
199 Tk_GetPixels.
200
201 -sticky style
202 If a window's pane is larger than the requested dimen‐
203 sions of the window, this option may be used to position
204 (or stretch) the window within its pane. Style is a
205 string that contains zero or more of the characters n, s,
206 e or w. The string can optionally contains spaces or
207 commas, but they are ignored. Each letter refers to a
208 side (north, south, east, or west) that the window will
209 "stick" to. If both n and s (or e and w) are specified,
210 the window will be stretched to fill the entire height
211 (or width) of its cavity.
212
213 -width size
214 Specify a width for the window. The width will be the
215 outer dimension of the window including its border, if
216 any. If size is an empty string, or if -width is not
217 specified, then the width requested internally by the
218 window will be used initially; the width may later be
219 adjusted by the movement of sashes in the panedwindow.
220 Size may be any value accepted by Tk_GetPixels.
221
222 pathName panes
223 Returns an ordered list of the widgets managed by pathName.
224
226 A pane is resized by grabbing the sash (or sash handle if present) and
227 dragging with the mouse. This is accomplished via mouse motion bind‐
228 ings on the widget. When a sash is moved, the sizes of the panes on
229 each side of the sash, and thus the widgets in those panes, are
230 adjusted.
231
232 When a pane is resized from outside (e.g. it is packed to expand and
233 fill, and the containing toplevel is resized), space is added to the
234 final (rightmost or bottommost) pane in the window.
235
236
238 panedwindow, widget, geometry management
239
240
241
242Tk 8.4 panedwindow(n)