author | Claus Gittinger <cg@exept.de> |
Wed, 19 Sep 2001 10:28:29 +0200 | |
changeset 2405 | dcdb739b64f8 |
parent 2390 | 0a72663d8e59 |
child 2449 | b9bf97bf089d |
permissions | -rw-r--r-- |
0 | 1 |
" |
5 | 2 |
COPYRIGHT (c) 1991 by Claus Gittinger |
59 | 3 |
All Rights Reserved |
0 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
2212
7475e8be57bb
recompute label origin, if the form changes
Claus Gittinger <cg@exept.de>
parents:
2162
diff
changeset
|
13 |
"{ Package: 'stx:libwidg' }" |
7475e8be57bb
recompute label origin, if the form changes
Claus Gittinger <cg@exept.de>
parents:
2162
diff
changeset
|
14 |
|
740
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
15 |
DialogBox subclass:#OptionBox |
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
16 |
instanceVariableNames:'formLabel textLabel buttons actions defaultButtonIndex' |
355 | 17 |
classVariableNames:'WarnBitmap' |
18 |
poolDictionaries:'' |
|
19 |
category:'Views-DialogBoxes' |
|
0 | 20 |
! |
21 |
||
847 | 22 |
!OptionBox class methodsFor:'documentation'! |
7 | 23 |
|
38 | 24 |
copyright |
25 |
" |
|
26 |
COPYRIGHT (c) 1991 by Claus Gittinger |
|
59 | 27 |
All Rights Reserved |
38 | 28 |
|
29 |
This software is furnished under a license and may be used |
|
30 |
only in accordance with the terms of that license and with the |
|
31 |
inclusion of the above copyright notice. This software may not |
|
32 |
be provided or otherwise made available to, or used by, any |
|
33 |
other person. No title to or ownership of the software is |
|
34 |
hereby transferred. |
|
35 |
" |
|
36 |
! |
|
37 |
||
7 | 38 |
documentation |
39 |
" |
|
646 | 40 |
CAVEAT: this is a leftover - functionality has been merged into DialogBox |
41 |
PLEASE use one of the `Dialog chooseXXX' methods nstead of OptionBox. |
|
42 |
||
43 |
||
355 | 44 |
Historic note: |
646 | 45 |
originally, ST/X had separate classes for the various entry methods; |
46 |
there were YesNoBox, EnterBox, InfoBox and so on. |
|
47 |
In the meantime, the DialogBox class (and therefore its alias: Dialog) |
|
48 |
is going to duplicate most funcionality found in these classes. |
|
355 | 49 |
|
646 | 50 |
In the future, those existing subclasses' functionality is going to |
51 |
be moved fully into Dialog, and the subclasses will be replaced by dummy |
|
52 |
delegators. (They will be kept for backward compatibility, though). |
|
355 | 53 |
|
54 |
||
38 | 55 |
OptionBoxes are like YesNoBoxes but with as many buttons as you like; |
91 | 56 |
this will finally be a superclass of WarnBox and YesNoBox - or maybe merged |
38 | 57 |
all into DialogBox.. |
97 | 58 |
Use them for multiway questions. |
91 | 59 |
For a consistent user interface, the rightmost button is the default return |
97 | 60 |
button (i.e. pressing return in the box performs this buttons function). |
91 | 61 |
|
646 | 62 |
[author:] |
63 |
Claus Gittinger |
|
91 | 64 |
|
646 | 65 |
[see also:] |
66 |
DialogBox |
|
67 |
" |
|
68 |
! |
|
91 | 69 |
|
646 | 70 |
examples |
71 |
" |
|
72 |
[exBegin] |
|
73 |
|box| |
|
97 | 74 |
|
646 | 75 |
box := OptionBox title:'hello' numberOfOptions:4. |
76 |
box showAtPointer |
|
77 |
[exEnd] |
|
97 | 78 |
|
79 |
||
646 | 80 |
[exBegin] |
81 |
|box| |
|
82 |
box := OptionBox title:'hello' numberOfOptions:3. |
|
83 |
box buttonTitles:#('one' 'two' 'three'). |
|
84 |
box showAtPointer |
|
85 |
[exEnd] |
|
97 | 86 |
|
646 | 87 |
performing an action: |
97 | 88 |
|
646 | 89 |
[exBegin] |
90 |
|box| |
|
91 |
box := OptionBox title:'hello' numberOfOptions:3. |
|
92 |
box buttonTitles:#('one' 'two' 'three'). |
|
93 |
box action:[:which | Transcript show:'button '; |
|
94 |
show: which; |
|
655 | 95 |
showCR:' was pressed']. |
646 | 96 |
box showAtPointer |
97 |
[exEnd] |
|
97 | 98 |
|
646 | 99 |
returning a value: |
100 |
[exBegin] |
|
101 |
|what| |
|
133 | 102 |
|
646 | 103 |
what := OptionBox |
104 |
request:('text has not been accepted.\\Your modifications will be lost when continuing.') withCRs |
|
105 |
label:' Attention' |
|
106 |
form:(WarningBox iconBitmap) |
|
107 |
buttonLabels:#('abort' 'accept' 'continue') |
|
108 |
values:#(#abort #accept #continue). |
|
655 | 109 |
Transcript showCR:what. |
646 | 110 |
[exEnd] |
7 | 111 |
" |
197 | 112 |
! ! |
113 |
||
847 | 114 |
!OptionBox class methodsFor:'instance creation'! |
197 | 115 |
|
116 |
title:titleString numberOfOptions:nOptions |
|
117 |
"create a new optionBox with title, aTitleString and nOptions options" |
|
118 |
||
119 |
|box| |
|
120 |
||
121 |
box := (self basicNew) numberOfOptions:nOptions. |
|
122 |
box device:Screen current. |
|
123 |
box initialize. |
|
124 |
box title:titleString. |
|
125 |
^ box |
|
7 | 126 |
! ! |
127 |
||
847 | 128 |
!OptionBox class methodsFor:'easy startup '! |
95 | 129 |
|
2405 | 130 |
request:title label:label buttonLabels:labels values:values |
131 |
"create a new optionBox, open it modal and return the value of |
|
132 |
the corresponding values collection." |
|
133 |
||
134 |
^ self |
|
135 |
request:title label:label form:(YesNoBox iconBitmap) |
|
136 |
buttonLabels:labels values:values default:nil onCancel:nil |
|
137 |
! |
|
138 |
||
139 |
request:title label:label buttonLabels:labels values:values default:defaultValue |
|
140 |
"create a new optionBox, open it modal and return the value of |
|
141 |
the corresponding values collection. (nil if cancelled)" |
|
142 |
||
143 |
^ self |
|
144 |
request:title label:label form:(YesNoBox iconBitmap) buttonLabels:labels values:values |
|
145 |
default:defaultValue onCancel:defaultValue |
|
146 |
! |
|
147 |
||
148 |
request:title label:label buttonLabels:labels values:values default:defaultValue onCancel:cancelValue |
|
149 |
"create a new optionBox, open it modal and return the value of |
|
150 |
the corresponding values collection. (nil if cancelled)" |
|
151 |
||
152 |
^ self |
|
153 |
request:title label:label form:(YesNoBox iconBitmap) buttonLabels:labels values:values |
|
154 |
default:defaultValue onCancel:cancelValue |
|
155 |
! |
|
156 |
||
133 | 157 |
request:title label:label form:aForm buttonLabels:labels values:values |
158 |
"create a new optionBox, open it modal and return the value of |
|
159 |
the corresponding values collection." |
|
160 |
||
2390 | 161 |
^ self request:title label:label form:aForm buttonLabels:labels values:values default:nil onCancel:nil |
133 | 162 |
! |
163 |
||
164 |
request:title label:label form:aForm buttonLabels:labels values:values default:defaultValue |
|
95 | 165 |
"create a new optionBox, open it modal and return the value of |
2389 | 166 |
the corresponding values collection. (nil if cancelled)" |
95 | 167 |
|
2390 | 168 |
^ self |
169 |
request:title label:label form:aForm buttonLabels:labels values:values |
|
170 |
default:defaultValue onCancel:defaultValue |
|
171 |
! |
|
172 |
||
173 |
request:title label:label form:aForm buttonLabels:labels values:values default:defaultValue onCancel:cancelValue |
|
174 |
"create a new optionBox, open it modal and return the value of |
|
175 |
the corresponding values collection. (cancelValue if cancelled)" |
|
176 |
||
2162 | 177 |
|box retVal| |
95 | 178 |
|
2390 | 179 |
retVal := cancelValue. |
95 | 180 |
box := OptionBox title:title numberOfOptions:(labels size). |
181 |
box buttonTitles:labels. |
|
133 | 182 |
box defaultButtonIndex:(values indexOf:defaultValue). |
2162 | 183 |
box action:[:n | retVal := values at:n]. |
95 | 184 |
box label:label; form:aForm. |
185 |
box showAtPointer. |
|
920 | 186 |
box destroy. |
2389 | 187 |
|
2162 | 188 |
^ retVal |
95 | 189 |
|
190 |
" |
|
97 | 191 |
OptionBox request:'please select' |
920 | 192 |
label:'select any' |
193 |
form:(WarningBox iconBitmap) |
|
194 |
buttonLabels:#('one' 'two' 'three') |
|
195 |
values:#(1 2 3) |
|
196 |
default:3 |
|
95 | 197 |
" |
920 | 198 |
|
2162 | 199 |
"Modified: / 23.2.2000 / 11:59:32 / cg" |
95 | 200 |
! ! |
201 |
||
197 | 202 |
!OptionBox methodsFor:'accessing'! |
203 |
||
204 |
action:actionBlock |
|
205 |
"define a single the action for all buttons. |
|
206 |
The action will be evaluated with the button index as argument." |
|
207 |
||
208 |
buttons keysAndValuesDo:[:index :button | |
|
209 |
button action:[ |
|
210 |
button turnOffWithoutRedraw. |
|
211 |
self hide. |
|
212 |
actionBlock value:index |
|
213 |
] |
|
214 |
]. |
|
215 |
! |
|
216 |
||
217 |
actions:actionBlocks |
|
218 |
"define the actions" |
|
0 | 219 |
|
197 | 220 |
actions := actionBlocks |
221 |
! |
|
222 |
||
223 |
buttonTitles:titles actions:actionBlocks |
|
224 |
"define both button titles and actions" |
|
225 |
||
226 |
self buttonTitles:titles. |
|
227 |
actions := actionBlocks. |
|
228 |
! |
|
0 | 229 |
|
197 | 230 |
buttons |
231 |
"return the buttons collection" |
|
232 |
||
233 |
^ buttons |
|
234 |
! |
|
235 |
||
236 |
defaultButtonIndex:index |
|
847 | 237 |
"define which button is the default (i.e. return-) button. |
238 |
By default, no returnButton is setup. The argument must be an |
|
239 |
index 1..nButtons, or nil" |
|
240 |
||
197 | 241 |
defaultButtonIndex notNil ifTrue:[ |
847 | 242 |
(buttons at:defaultButtonIndex) isReturnButton:false |
197 | 243 |
]. |
244 |
(index notNil and:[index ~~ 0]) ifTrue:[ |
|
847 | 245 |
defaultButtonIndex := index. |
246 |
defaultButtonIndex notNil ifTrue:[ |
|
247 |
(buttons at:defaultButtonIndex) isReturnButton:true |
|
248 |
]. |
|
197 | 249 |
] |
847 | 250 |
|
251 |
"Modified: 18.10.1996 / 14:53:36 / cg" |
|
197 | 252 |
! |
253 |
||
254 |
numberOfOptions |
|
255 |
"return the number of options" |
|
256 |
||
257 |
^ buttons size |
|
258 |
! |
|
259 |
||
260 |
numberOfOptions:nOptions |
|
847 | 261 |
"set the number of options - this is a private interface" |
197 | 262 |
|
263 |
buttons := (OrderedCollection new:nOptions) grow:nOptions. |
|
264 |
actions := (OrderedCollection new:nOptions) grow:nOptions |
|
847 | 265 |
|
266 |
"Modified: 18.10.1996 / 14:54:30 / cg" |
|
740
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
267 |
! ! |
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
268 |
|
2227 | 269 |
!OptionBox methodsFor:'accessing-look'! |
740
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
270 |
|
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
271 |
buttonTitles:titles |
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
272 |
"set the button titles" |
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
273 |
|
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
274 |
titles keysAndValuesDo:[:index :aString | |
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
275 |
|b| |
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
276 |
|
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
277 |
(b := buttons at:index) label:aString. |
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
278 |
b resize. |
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
279 |
]. |
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
280 |
shown ifTrue:[self resize] |
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
281 |
! |
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
282 |
|
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
283 |
form:aFormOrImage |
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
284 |
"set the image shown in the label-view" |
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
285 |
|
2212
7475e8be57bb
recompute label origin, if the form changes
Claus Gittinger <cg@exept.de>
parents:
2162
diff
changeset
|
286 |
|mm| |
7475e8be57bb
recompute label origin, if the form changes
Claus Gittinger <cg@exept.de>
parents:
2162
diff
changeset
|
287 |
|
7475e8be57bb
recompute label origin, if the form changes
Claus Gittinger <cg@exept.de>
parents:
2162
diff
changeset
|
288 |
mm := ViewSpacing. |
7475e8be57bb
recompute label origin, if the form changes
Claus Gittinger <cg@exept.de>
parents:
2162
diff
changeset
|
289 |
formLabel form:aFormOrImage. |
7475e8be57bb
recompute label origin, if the form changes
Claus Gittinger <cg@exept.de>
parents:
2162
diff
changeset
|
290 |
textLabel origin:((mm + formLabel width + mm) @ mm). |
7475e8be57bb
recompute label origin, if the form changes
Claus Gittinger <cg@exept.de>
parents:
2162
diff
changeset
|
291 |
|
740
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
292 |
! |
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
293 |
|
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
294 |
formLabel |
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
295 |
"return the label-view which displays a bitmap" |
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
296 |
|
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
297 |
^ formLabel |
197 | 298 |
! |
0 | 299 |
|
2328 | 300 |
textLabel |
301 |
"return the label-view which displays a message string" |
|
302 |
||
303 |
^ textLabel |
|
304 |
! |
|
305 |
||
0 | 306 |
title:aString |
16 | 307 |
"set the boxes title" |
0 | 308 |
|
16 | 309 |
aString ~= textLabel label ifTrue:[ |
59 | 310 |
textLabel label:aString withoutSeparators. |
110 | 311 |
textLabel forceResize. |
97 | 312 |
shown ifTrue:[self resize] |
16 | 313 |
] |
0 | 314 |
! |
315 |
||
97 | 316 |
title:aString numberOfOptions:nOptions |
317 |
"set the boxes title and number of options" |
|
318 |
||
319 |
self title:aString. |
|
320 |
buttons grow:nOptions. |
|
321 |
actions grow:nOptions |
|
197 | 322 |
! ! |
97 | 323 |
|
197 | 324 |
!OptionBox methodsFor:'events'! |
77 | 325 |
|
197 | 326 |
keyPress:aKey x:x y:y |
327 |
"return-key dublicates ok-function if acceptReturnAsOK is true" |
|
77 | 328 |
|
490 | 329 |
<resource: #keyboard (#Return)> |
330 |
||
197 | 331 |
|action| |
77 | 332 |
|
197 | 333 |
defaultButtonIndex notNil ifTrue:[ |
490 | 334 |
(aKey == #Return) ifTrue:[ |
335 |
self hide. |
|
336 |
action := actions at:defaultButtonIndex. |
|
337 |
action notNil ifTrue:[ |
|
338 |
action value |
|
339 |
] |
|
340 |
] |
|
197 | 341 |
]. |
342 |
super keyPress:aKey x:x y:y |
|
490 | 343 |
|
344 |
"Modified: 7.3.1996 / 13:17:36 / cg" |
|
197 | 345 |
! ! |
0 | 346 |
|
197 | 347 |
!OptionBox methodsFor:'initializing'! |
7 | 348 |
|
197 | 349 |
initFormBitmap |
350 |
WarnBitmap isNil ifTrue:[ |
|
1914 | 351 |
WarnBitmap := WarningBox iconBitmap. |
352 |
"/ WarnBitmap := Image fromFile:'bitmaps/Warning.xbm' resolution:100 on:Display |
|
0 | 353 |
]. |
197 | 354 |
formLabel form:WarnBitmap |
899 | 355 |
|
1914 | 356 |
"Modified: / 25.5.1999 / 16:08:06 / cg" |
0 | 357 |
! |
358 |
||
359 |
initialize |
|
372 | 360 |
|nButt mm| |
0 | 361 |
|
362 |
super initialize. |
|
363 |
||
372 | 364 |
mm := ViewSpacing. |
365 |
||
38 | 366 |
formLabel := Label in:self. |
367 |
self initFormBitmap. |
|
0 | 368 |
formLabel borderWidth:0. |
372 | 369 |
formLabel origin:(mm @ mm). |
0 | 370 |
|
188 | 371 |
textLabel := Label label:'Select' in:self. |
0 | 372 |
textLabel borderWidth:0. |
372 | 373 |
textLabel origin:((mm + formLabel width + mm) @ mm). |
0 | 374 |
|
1612
e7d3bc88a533
oops - two buttonPanels where created (MD's fix).
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
375 |
"/ buttonPanel isNil ifTrue:[ |
e7d3bc88a533
oops - two buttonPanels where created (MD's fix).
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
376 |
"/ buttonPanel := HorizontalPanelView origin:(0.0 @ 1.0) corner:(1.0 @ 1.0) in:self. |
e7d3bc88a533
oops - two buttonPanels where created (MD's fix).
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
377 |
"/ ]. |
130 | 378 |
buttonPanel |
372 | 379 |
bottomInset:mm; |
380 |
topInset:(font height + mm * 2) negated. |
|
130 | 381 |
buttonPanel |
372 | 382 |
borderWidth:0; |
383 |
horizontalLayout:#fitSpace. |
|
59 | 384 |
|
0 | 385 |
nButt := buttons size. |
386 |
||
7 | 387 |
1 to:nButt do:[:index | |
372 | 388 |
|button| |
7 | 389 |
|
372 | 390 |
button := Button label:'press'. |
391 |
button action:[ |
|
392 |
|action| |
|
7 | 393 |
|
372 | 394 |
(buttons at:index) turnOffWithoutRedraw. |
395 |
self hide. |
|
396 |
action := actions at:index. |
|
397 |
action notNil ifTrue:[ |
|
398 |
action value |
|
399 |
] |
|
400 |
]. |
|
133 | 401 |
"/ index == nButt ifTrue:[ |
402 |
"/ button isReturnButton:true |
|
403 |
"/ ]. |
|
372 | 404 |
buttonPanel addSubView:button. |
405 |
buttons at:index put:button. |
|
91 | 406 |
]. |
407 |
||
408 |
" |
|
409 |
|box| |
|
410 |
||
411 |
box := OptionBox title:'hello' numberOfOptions:4. |
|
412 |
box open |
|
413 |
" |
|
372 | 414 |
|
1612
e7d3bc88a533
oops - two buttonPanels where created (MD's fix).
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
415 |
"Modified: / 27.7.1998 / 19:37:17 / cg" |
133 | 416 |
! ! |
417 |
||
63 | 418 |
!OptionBox methodsFor:'queries'! |
0 | 419 |
|
130 | 420 |
preferredExtent |
59 | 421 |
"return a size to make everything fit into myself" |
422 |
||
371 | 423 |
|w w1 h maxH prefPanel mm| |
0 | 424 |
|
799 | 425 |
"/ If I have an explicit preferredExtent .. |
426 |
||
713
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
427 |
preferredExtent notNil ifTrue:[ |
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
428 |
^ preferredExtent |
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
429 |
]. |
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
430 |
|
371 | 431 |
mm := ViewSpacing. |
432 |
||
433 |
w1 := (mm * 3) + formLabel width + textLabel width. |
|
130 | 434 |
prefPanel := buttonPanel preferredExtent. |
91 | 435 |
w := w1 max:prefPanel x. |
38 | 436 |
|
97 | 437 |
"/ maxH := 0. |
438 |
"/ buttons do:[:button | |
|
130 | 439 |
"/ maxH := maxH max:(button preferredExtent y) |
97 | 440 |
"/ ]. |
441 |
maxH := prefPanel y. |
|
0 | 442 |
|
371 | 443 |
h := (mm * 4) |
444 |
+ ((formLabel height) max:(textLabel height)) |
|
445 |
+ maxH. |
|
0 | 446 |
|
59 | 447 |
^ w @ h |
371 | 448 |
|
799 | 449 |
"Modified: 19.7.1996 / 20:45:11 / cg" |
0 | 450 |
! ! |
197 | 451 |
|
847 | 452 |
!OptionBox class methodsFor:'documentation'! |
243 | 453 |
|
454 |
version |
|
2405 | 455 |
^ '$Header: /cvs/stx/stx/libwidg/OptionBox.st,v 1.48 2001-09-19 08:28:29 cg Exp $' |
243 | 456 |
! ! |