--- a/OptionBox.st Mon Feb 06 01:52:01 1995 +0100
+++ b/OptionBox.st Mon Feb 06 01:53:30 1995 +0100
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1991 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/OptionBox.st,v 1.9 1994-11-17 14:38:21 claus Exp $
+$Header: /cvs/stx/stx/libwidg/OptionBox.st,v 1.10 1995-02-06 00:52:53 claus Exp $
'!
!OptionBox class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/OptionBox.st,v 1.9 1994-11-17 14:38:21 claus Exp $
+$Header: /cvs/stx/stx/libwidg/OptionBox.st,v 1.10 1995-02-06 00:52:53 claus Exp $
"
!
@@ -92,6 +92,18 @@
]
!
+formLabel
+ "return the label-view which displays a bitmap"
+
+ ^ formLabel
+!
+
+form:aFormOrImage
+ "set the image shown in the label-view"
+
+ formLabel form:aFormOrImage
+!
+
numberOfOptions:nOptions
"set the number of options"
@@ -142,7 +154,7 @@
!OptionBox methodsFor:'initializing'!
initialize
- |nButt|
+ |nButt buttonPanel|
super initialize.
@@ -155,15 +167,10 @@
textLabel borderWidth:0.
textLabel origin:((ViewSpacing + formLabel width + ViewSpacing) @ ViewSpacing).
-"
- buttonPanel := HorizontalPanelView in:self.
- buttonPanel origin:(0.0 @ 1.0)
- corner:(1.0 @ 1.0).
- buttonPanel leftInset:mm;
- rightInset:mm;
- topInset:(font height * 2 + mm + mm) negated;
- bottomInset:mm.
-"
+ buttonPanel := HorizontalPanelView origin:(0.0 @ 1.0) corner:(1.0 @ 1.0) in:self.
+ buttonPanel bottomInset:ViewSpacing;
+ topInset:(font height + ViewSpacing * 2) negated.
+ buttonPanel borderWidth:0; layout:#fitSpace.
nButt := buttons size.
@@ -181,15 +188,8 @@
action value
]
]
- in:self.
+ in:buttonPanel "self".
buttons at:index put:button.
- button origin:[( (index-1) * ((width-ViewSpacing) // nButt) + (ViewSpacing) )
- @
- (height - ViewSpacing - (buttons at:index) heightIncludingBorder)].
- button extent:[(width-ViewSpacing-ViewSpacing // nButt - ViewSpacing)
- @
- (buttons at:index) height
- ]
]
!
@@ -198,6 +198,10 @@
WarnBitmap := Form fromFile:'Warning.xbm' resolution:100 on:Display
].
formLabel form:WarnBitmap
+!
+
+focusSequence
+ ^ buttons
! !
!OptionBox methodsFor:'queries'!