checkin from browser
authorClaus Gittinger <cg@exept.de>
Thu, 25 Mar 1999 16:50:50 +0100
changeset 1284 1fb5f5cbd4d3
parent 1283 60bd413544f4
child 1285 839acde3f42c
checkin from browser
ExtendedComboBox.st
--- a/ExtendedComboBox.st	Thu Mar 25 16:37:39 1999 +0100
+++ b/ExtendedComboBox.st	Thu Mar 25 16:50:50 1999 +0100
@@ -155,13 +155,12 @@
                                                                                 [exBegin]
     |top menu widget|
 
-    top  := StandardSystemView extent:250@35.
+    top  := StandardSystemView extent:80@35.
     menu := ExtendedComboBox origin:5 @ 5 corner:1.0 @ 0.0 in:top.
     menu bottomInset:(menu preferredExtent y negated).
-    menu contents:'lets do the timeWarp again...'.
+    menu contents:'time...'.
 
     widget := ClockView new.
-    menu menuHeight:[widget width].
     menu menuWidget:widget.
     menu usePreferredWidthForMenu:true.
     top open.
@@ -804,7 +803,7 @@
     usePreferredWidthForMenu ifFalse:[
         w := width
     ] ifTrue:[
-        (w := widgetPrfExt "menuPrfExt" x) <= width ifTrue:[
+        (w := widgetPrfExt x+(menuWrapper margin*2) "menuPrfExt x") <= width ifTrue:[
             w := width
         ] ifFalse:[
             (w + menuOrigin x) > useableExt x ifTrue:[
@@ -838,7 +837,10 @@
 preferredExtent
     "compute & return the preferredExtent from the components' preferrences
     "
-    ^ widget preferredExtent + (margin * 2).
+
+    ^ (widget preferredExtent max:(widget widthOfContents @ widget heightOfContents))
+      + (margin * 2) + 8.
+
 "/    |x y|
 "/
 "/    x := widget widthOfContents  + 8.
@@ -1058,5 +1060,5 @@
 !ExtendedComboBox class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/ExtendedComboBox.st,v 1.8 1999-03-25 15:37:23 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/ExtendedComboBox.st,v 1.9 1999-03-25 15:50:50 cg Exp $'
 ! !