OptionBox.st
changeset 952 9accd6d8221c
parent 920 8487cf717bdf
child 953 050fba15277a
--- a/OptionBox.st	Thu Jan 16 19:07:13 1997 +0100
+++ b/OptionBox.st	Thu Jan 16 20:37:34 1997 +0100
@@ -370,13 +370,23 @@
 
     |idx butt|
 
+    "get our size (preferredExtent) and compute
+     origin and extent of buttonPanel and okButton.
+     This is normally done on view realization."
+
+    self resize.
+    buttonPanel pixelOrigin:buttonPanel computeOrigin.
+    buttonPanel pixelExtent:buttonPanel computeExtent.
     buttonPanel setChildPositionsIfChanged.
+
     idx := buttons findFirst:[:b | b isReturnButton].
     idx ~~ 0 ifTrue:[
-	butt := buttons at:idx.
-	^ (butt originRelativeTo:self) + (butt extent // 2)
+        butt := buttons at:idx.
+        ^ (butt originRelativeTo:self) + (butt extent // 2)
     ].
     ^ self extent // 2
+
+    "Modified: 16.1.1997 / 20:36:38 / cg"
 !
 
 preferredExtent 
@@ -414,5 +424,5 @@
 !OptionBox class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/OptionBox.st,v 1.37 1997-01-07 21:59:42 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/OptionBox.st,v 1.38 1997-01-16 19:37:34 cg Exp $'
 ! !