DialogBox.st
changeset 4653 81ab264cb68f
parent 4642 e2b1cd9dd459
child 4671 c59883574da1
--- a/DialogBox.st	Wed Jul 10 12:13:05 2013 +0200
+++ b/DialogBox.st	Fri Jul 12 14:00:47 2013 +0200
@@ -7311,7 +7311,11 @@
 !
 
 addMessage:labelString centered:centered
-    ^ self addTextLabel:labelString
+    |l|
+
+    l := self addTextLabel:labelString.
+    l adjust:(centered ifTrue:[#center] ifFalse:[#left]).
+    ^ l
 
     "Created: / 4.2.2000 / 00:03:24 / cg"
 !
@@ -8088,6 +8092,30 @@
     "Modified: 4.3.1996 / 17:22:59 / cg"
 !
 
+addComboListOn:aModel list:list tabable:tabable
+    "create a comboListView on aModel and add it.
+     Returns the comboListView."
+
+    ^ (self addComboListOn:aModel tabable:tabable) list:list
+
+    "
+     |box val|
+
+     val := '' asValue.
+
+     box := Dialog new.
+
+     (box addTextLabel:'combo box example') adjust:#left.
+     box addVerticalSpace.
+     (box addComboListOn:val list:#('one' 'two' 'three' 'four') tabable:true).
+     box addOkButton.
+     box open.
+     box accepted ifTrue:[
+        Transcript showCR:val value
+     ].
+    "
+!
+
 addComboListOn:aModel tabable:tabable
     "create a comboListView on aModel and add it.
      Returns the comboListView."
@@ -9954,11 +9982,11 @@
 !DialogBox class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.340 2013-07-05 12:25:14 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.341 2013-07-12 12:00:47 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.340 2013-07-05 12:25:14 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.341 2013-07-12 12:00:47 cg Exp $'
 ! !