ComboView.st
changeset 1348 b4bf740ec2fc
parent 1344 100e4d309847
child 1544 d8290e5a0b05
--- a/ComboView.st	Thu Apr 29 11:29:30 1999 +0200
+++ b/ComboView.st	Thu Apr 29 11:45:36 1999 +0200
@@ -530,7 +530,19 @@
     ] ifFalse:[
         m := MenuView labels:list.
         menuPrefX := m preferredExtent x.
-        menuPrefY := (m preferredExtentForLines:1 cols:10) y
+
+        "/ the menuView returns rubbish ...
+"/        menuPrefY := (m preferredExtentForLines:1 cols:10) y
+        
+        "/ any non-strings ?
+        menuPrefY := list 
+            inject:('X' heightOn:self) 
+            into:[:max :el | el isString ifTrue:[
+                                max
+                              ] ifFalse:[
+                                max max:(el heightOn:self) 
+                              ]
+                 ].
     ].
 
     fieldPref := field preferredExtent.
@@ -542,8 +554,8 @@
     h := h + margin + margin.
     ^ w @ h
 
-    "Created: 28.2.1996 / 15:03:17 / cg"
-    "Modified: 7.3.1997 / 16:42:15 / cg"
+    "Created: / 28.2.1996 / 15:03:17 / cg"
+    "Modified: / 29.4.1999 / 11:27:54 / cg"
 ! !
 
 !ComboView methodsFor:'user interaction'!
@@ -594,5 +606,5 @@
 !ComboView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/ComboView.st,v 1.53 1999-04-28 11:27:02 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/ComboView.st,v 1.54 1999-04-29 09:45:36 cg Exp $'
 ! !