PopUpList.st
changeset 128 06a050529335
parent 127 462396b08e30
child 135 e302b73d9439
--- a/PopUpList.st	Fri May 12 20:25:18 1995 +0200
+++ b/PopUpList.st	Wed May 17 14:26:27 1995 +0200
@@ -23,7 +23,7 @@
 COPYRIGHT (c) 1994 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libwidg/PopUpList.st,v 1.14 1995-05-12 18:24:51 claus Exp $
+$Header: /cvs/stx/stx/libwidg/PopUpList.st,v 1.15 1995-05-17 12:25:44 claus Exp $
 '!
 
 !PopUpList class methodsFor:'documentation'!
@@ -44,7 +44,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libwidg/PopUpList.st,v 1.14 1995-05-12 18:24:51 claus Exp $
+$Header: /cvs/stx/stx/libwidg/PopUpList.st,v 1.15 1995-05-17 12:25:44 claus Exp $
 "
 !
 
@@ -299,6 +299,18 @@
 
 !PopUpList methodsFor:'drawing'!
 
+showActive
+    "no need to redraw - will pop menu ontop of me anyway ..."
+
+    ^ self
+!
+
+showPassive
+    "no need to redraw - will redraw from unpopped menu anyway ..."
+
+    ^ self
+!
+
 drawWith:fgColor and:bgColor
     |mmH mmV mW mH|
 
@@ -319,7 +331,7 @@
 !PopUpList methodsFor:'event handling'!
 
 popMenu
-    |org mv|
+    |org mv w|
 
     menu notNil ifTrue:[
 	self turnOffWithoutRedraw. 
@@ -330,7 +342,9 @@
 	"
 	mv := menu menuView.
 	mv create.      "/ stupid: it resizes itself upon first create
-	mv width:(self width - (2 * menu margin) - (menu borderWidth*2)).
+	w := mv width.  "/ to its preferred size.
+	w := w max:(self width - (2 * menu margin) - (menu borderWidth*2)).
+	mv width:w.
 	mv level:0; borderWidth:0.
 
 	"