1panedwindow(n) Tk Built-In Commands panedwindow(n)
2
3
4
5______________________________________________________________________________
6
8 panedwindow - Create and manipulate 'panedwindow' split container wid‐
9 gets
10
12 panedwindow pathName ?options?
13
15 -background -borderwidth -cursor
16 -orient -relief
17
18 See the options manual entry for details on the standard options.
19
21 Command-Line Name:-handlepad
22 Database Name: handlePad
23 Database Class: HandlePad
24
25 When sash handles are drawn, specifies the distance from the top
26 or left end of the sash (depending on the orientation of the
27 widget) at which to draw the handle. May be any value accepted
28 by Tk_GetPixels.
29
30 Command-Line Name:-handlesize
31 Database Name: handleSize
32 Database Class: HandleSize
33
34 Specifies the side length of a sash handle. Handles are always
35 drawn as squares. May be any value accepted by Tk_GetPixels.
36
37 Command-Line Name:-height
38 Database Name: height
39 Database Class: Height
40
41 Specifies a desired height for the overall panedwindow widget.
42 May be any value accepted by Tk_GetPixels. If an empty string,
43 the widget will be made high enough to allow all contained wid‐
44 gets to have their natural height.
45
46 Command-Line Name:-proxybackground
47 Database Name: proxyBackground
48 Database Class: ProxyBackground
49
50 Background color to use when drawing the proxy. If an empty
51 string, the value of the -background option will be used.
52
53 Command-Line Name:-proxyborderwidth
54 Database Name: proxyBorderWidth
55 Database Class: ProxyBorderWidth
56
57 Specifies the borderwidth of the proxy. May be any value
58 accepted by Tk_GetPixels.
59
60 Command-Line Name:-proxyrelief
61 Database Name: proxyRelief
62 Database Class: ProxyRelief
63
64 Relief to use when drawing the proxy. May be any of the standard
65 Tk relief values. If an empty string, the value of the -sashre‐
66 lief option will be used.
67
68 Command-Line Name:-opaqueresize
69 Database Name: opaqueResize
70 Database Class: OpaqueResize
71
72 Specifies whether panes should be resized as a sash is moved
73 (true), or if resizing should be deferred until the sash is
74 placed (false).
75
76 Command-Line Name:-sashcursor
77 Database Name: sashCursor
78 Database Class: SashCursor
79
80 Mouse cursor to use when over a sash. If null, sb_h_dou‐
81 ble_arrow will be used for horizontal panedwindows, and
82 sb_v_double_arrow will be used for vertical panedwindows.
83
84 Command-Line Name:-sashpad
85 Database Name: sashPad
86 Database Class: SashPad
87
88 Specifies the amount of padding to leave of each side of a sash.
89 May be any value accepted by Tk_GetPixels.
90
91 Command-Line Name:-sashrelief
92 Database Name: sashRelief
93 Database Class: SashRelief
94
95 Relief to use when drawing a sash. May be any of the standard
96 Tk relief values.
97
98 Command-Line Name:-sashwidth
99 Database Name: sashWidth
100 Database Class: SashWidth
101
102 Specifies the width of each sash. May be any value accepted by
103 Tk_GetPixels.
104
105 Command-Line Name:-showhandle
106 Database Name: showHandle
107 Database Class: ShowHandle
108
109 Specifies whether sash handles should be shown. May be any
110 valid Tcl boolean value.
111
112 Command-Line Name:-width
113 Database Name: width
114 Database Class: Width
115
116 Specifies a desired width for the overall panedwindow widget.
117 May be any value accepted by Tk_GetPixels. If an empty string,
118 the widget will be made wide enough to allow all contained wid‐
119 gets to have their natural width.
120______________________________________________________________________________
121
123 The panedwindow command creates a new window (given by the pathName
124 argument) and makes it into a panedwindow widget. Additional options,
125 described above, may be specified on the command line or in the option
126 database to configure aspects of the panedwindow such as its default
127 background color and relief. The panedwindow command returns the path
128 name of the new window.
129
130 A panedwindow widget contains any number of panes, arranged horizon‐
131 tally or vertically, according to the value of the -orient option.
132 Each pane contains one widget, and each pair of panes is separated by a
133 moveable (via mouse movements) sash. Moving a sash causes the widgets
134 on either side of the sash to be resized.
135
137 The panedwindow command creates a new Tcl command whose name is the
138 same as the path name of the panedwindow's window. This command may be
139 used to invoke various operations on the widget. It has the following
140 general form:
141 pathName option ?arg arg ...?
142 PathName is the name of the command, which is the same as the panedwin‐
143 dow widget's path name. Option and the args determine the exact behav‐
144 ior of the command. The following commands are possible for panedwin‐
145 dow widgets:
146
147 pathName add window ?window ...? ?option value ...?
148 Add one or more windows to the panedwindow, each in a separate
149 pane. The arguments consist of the names of one or more windows
150 followed by pairs of arguments that specify how to manage the
151 windows. Option may have any of the values accepted by the con‐
152 figure subcommand.
153
154 pathName cget option
155 Returns the current value of the configuration option given by
156 option. Option may have any of the values accepted by the
157 panedwindow command.
158
159 pathName configure ?option? ?value option value ...?
160 Query or modify the configuration options of the widget. If no
161 option is specified, returns a list describing all of the avail‐
162 able options for pathName (see Tk_ConfigureInfo for information
163 on the format of this list). If option is specified with no
164 value, then the command returns a list describing the one named
165 option (this list will be identical to the corresponding sublist
166 of the value returned if no option is specified). If one or
167 more option-value pairs are specified, then the command modifies
168 the given widget option(s) to have the given value(s); in this
169 case the command returns an empty string. Option may have any of
170 the values accepted by the panedwindow command.
171
172 pathName forget window ?window ...?
173 Remove the pane containing window from the panedwindow. All
174 geometry management options for window will be forgotten.
175
176 pathName identify x y
177 Identify the panedwindow component underneath the point given by
178 x and y, in window coordinates. If the point is over a sash or
179 a sash handle, the result is a two element list containing the
180 index of the sash or handle, and a word indicating whether it is
181 over a sash or a handle, such as {0 sash} or {2 handle}. If the
182 point is over any other part of the panedwindow, the result is
183 an empty list.
184
185 pathName proxy ?args?
186 This command is used to query and change the position of the
187 sash proxy, used for rubberband-style pane resizing. It can take
188 any of the following forms:
189
190 pathName proxy coord
191 Return a list containing the x and y coordinates of the
192 most recent proxy location.
193
194 pathName proxy forget
195 Remove the proxy from the display.
196
197 pathName proxy place x y
198 Place the proxy at the given x and y coordinates.
199
200 pathName sash ?args?
201 This command is used to query and change the position of sashes
202 in the panedwindow. It can take any of the following forms:
203
204 pathName sash coord index
205 Return the current x and y coordinate pair for the sash
206 given by index. Index must be an integer between 0 and 1
207 less than the number of panes in the panedwindow. The
208 coordinates given are those of the top left corner of the
209 region containing the sash.
210
211 pathName sash dragto index x y
212 This command computes the difference between the given
213 coordinates and the coordinates given to the last sash
214 mark command for the given sash. It then moves that sash
215 the computed difference. The return value is the empty
216 string.
217
218 pathName sash mark index x y
219 Records x and y for the sash given by index; used in con‐
220 junction with later sash dragto commands to move the
221 sash.
222
223 pathName sash place index x y
224 Place the sash given by index at the given coordinates.
225
226 pathName panecget window option
227 Query a management option for window. Option may be any value
228 allowed by the paneconfigure subcommand.
229
230 pathName paneconfigure window ?option? ?value option value ...?
231 Query or modify the management options for window. If no option
232 is specified, returns a list describing all of the available
233 options for pathName (see Tk_ConfigureInfo for information on
234 the format of this list). If option is specified with no value,
235 then the command returns a list describing the one named option
236 (this list will be identical to the corresponding sublist of the
237 value returned if no option is specified). If one or more
238 option-value pairs are specified, then the command modifies the
239 given widget option(s) to have the given value(s); in this case
240 the command returns an empty string. The following options are
241 supported:
242
243 -after window
244 Insert the window after the window specified. window
245 should be the name of a window already managed by path‐
246 Name.
247
248 -before window
249 Insert the window before the window specified. window
250 should be the name of a window already managed by path‐
251 Name.
252
253 -height size
254 Specify a height for the window. The height will be the
255 outer dimension of the window including its border, if
256 any. If size is an empty string, or if -height is not
257 specified, then the height requested internally by the
258 window will be used initially; the height may later be
259 adjusted by the movement of sashes in the panedwindow.
260 Size may be any value accepted by Tk_GetPixels.
261
262 -hide boolean
263 Controls the visibility of a pane. When the boolean is
264 true (according to Tcl_GetBoolean) the pane will not be
265 visible, but it will still be maintained in the list of
266 panes.
267
268 -minsize n
269 Specifies that the size of the window cannot be made less
270 than n. This constraint only affects the size of the
271 widget in the paned dimension — the x dimension for hori‐
272 zontal panedwindows, the y dimension for vertical paned‐
273 windows. May be any value accepted by Tk_GetPixels.
274
275 -padx n
276 Specifies a non-negative value indicating how much extra
277 space to leave on each side of the window in the X-direc‐
278 tion. The value may have any of the forms accepted by
279 Tk_GetPixels.
280
281 -pady n
282 Specifies a non-negative value indicating how much extra
283 space to leave on each side of the window in the Y-direc‐
284 tion. The value may have any of the forms accepted by
285 Tk_GetPixels.
286
287 -sticky style
288 If a window's pane is larger than the requested dimen‐
289 sions of the window, this option may be used to position
290 (or stretch) the window within its pane. Style is a
291 string that contains zero or more of the characters n, s,
292 e or w. The string can optionally contains spaces or
293 commas, but they are ignored. Each letter refers to a
294 side (north, south, east, or west) that the window will
295 “stick” to. If both n and s (or e and w) are specified,
296 the window will be stretched to fill the entire height
297 (or width) of its cavity.
298
299 -stretch when
300 Controls how extra space is allocated to each of the
301 panes. When is one of always, first, last, middle, and
302 never. The panedwindow will calculate the required size
303 of all its panes. Any remaining (or deficit) space will
304 be distributed to those panes marked for stretching. The
305 space will be distributed based on each panes current
306 ratio of the whole. The when values have the following
307 definition:
308
309 always This pane will always stretch.
310
311 first Only if this pane is the first pane (left-most or
312 top-most) will it stretch.
313
314 last Only if this pane is the last pane (right-most or
315 bottom-most) will it stretch. This is the default
316 value.
317
318 middle Only if this pane is not the first or last pane
319 will it stretch.
320
321 never This pane will never stretch.
322
323 -width size
324 Specify a width for the window. The width will be the
325 outer dimension of the window including its border, if
326 any. If size is an empty string, or if -width is not
327 specified, then the width requested internally by the
328 window will be used initially; the width may later be
329 adjusted by the movement of sashes in the panedwindow.
330 Size may be any value accepted by Tk_GetPixels.
331
332 pathName panes
333 Returns an ordered list of the widgets managed by pathName.
334
336 A pane is resized by grabbing the sash (or sash handle if present) and
337 dragging with the mouse. This is accomplished via mouse motion bind‐
338 ings on the widget. When a sash is moved, the sizes of the panes on
339 each side of the sash, and thus the widgets in those panes, are
340 adjusted.
341
342 When a pane is resized from outside (e.g. it is packed to expand and
343 fill, and the containing toplevel is resized), space is added to the
344 final (rightmost or bottommost) pane in the window.
345
346 Unlike slave windows managed by e.g. pack or grid, the panes managed by
347 a panedwindow do not change width or height to accomodate changes in
348 the requested widths or heights of the panes, once these have become
349 mapped. Therefore it may be advisable, particularly when creating lay‐
350 outs interactively, to not add a pane to the panedwindow widget until
351 after the geometry requests of that pane has been finalized (i.e., all
352 components of the pane inserted, all options affecting geometry set to
353 their proper values, etc.).
354
356 ttk::panedwindow(n)
357
359 panedwindow, widget, geometry management
360
361
362
363Tk 8.4 panedwindow(n)