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