class: DialogBox
authorClaus Gittinger <cg@exept.de>
Sat, 31 Jan 2015 14:42:43 +0100
changeset 5245 a5a90c899ab2
parent 5244 261cf00fc93b
child 5246 28887183d75f
class: DialogBox added: #addTextLabelOn:adjust: comment/format in: #addTextLabel:adjust: #addTextLabelOn:
DialogBox.st
--- a/DialogBox.st	Sat Jan 31 14:05:27 2015 +0100
+++ b/DialogBox.st	Sat Jan 31 14:42:43 2015 +0100
@@ -7596,7 +7596,8 @@
 addTextLabel:aString adjust:how
     "create a text label - the name has been choosen for ST-80 compatibility;
      however, ST/X labels allow image labels too.
-     Returns the label."
+     Returns the label. 
+     The adjust argument must be one of #left, #right or #center (see Label for details)"
 
     |l|
 
@@ -7632,10 +7633,13 @@
     ^ l
 
     "
-     |b|
+     |holder b|
+
+     holder := ValueHolder with:'hello'.
 
      b := DialogBox new.
-     b addTextLabelOn:'hello' asValue.
+     b addTextLabelOn:holder asValue.
+     [ Delay waitForSeconds:2. holder value:'world' ] fork.
      b showAtPointer
     "
     "
@@ -7650,6 +7654,30 @@
     "
 !
 
+addTextLabelOn:aStringHolder adjust:how
+    "create a text label - the name has been choosen for ST-80 compatibility;
+     however, ST/X labels allow image labels too.
+     Returns the label. 
+     The adjust argument must be one of #left, #right or #center (see Label for details)"
+
+    |l|
+
+    l := self addTextLabelOn:aStringHolder.
+    l adjust:how.
+    ^ l
+
+    "
+     |holder b|
+
+     holder := ValueHolder with:'hello'.
+
+     b := DialogBox new.
+     b addTextLabelOn:holder asValue adjust:#left.
+     [ Delay waitForSeconds:2. holder value:'world' ] fork.
+     b showAtPointer
+    "
+!
+
 addToInputFieldGroup:aComponentOrSubcomponent
     "add a component to the input group.
      The argument, aComponentOrSubcomponent may even be a nested subcomponent of
@@ -10252,11 +10280,11 @@
 !DialogBox class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.361 2015-01-29 17:41:41 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.362 2015-01-31 13:42:43 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.361 2015-01-29 17:41:41 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.362 2015-01-31 13:42:43 cg Exp $'
 ! !