#FEATURE by cg
authorClaus Gittinger <cg@exept.de>
Mon, 11 Sep 2017 09:17:34 +0200
changeset 6208 15a6a6d337de
parent 6207 7a5c2914e422
child 6209 5e83ab74283d
#FEATURE by cg class: DialogBox class added: #withCheckBoxFor:labelled:do:
DialogBox.st
--- a/DialogBox.st	Tue Sep 05 19:51:48 2017 +0200
+++ b/DialogBox.st	Mon Sep 11 09:17:34 2017 +0200
@@ -6325,6 +6325,28 @@
     "
 !
 
+withCheckBoxFor:checkModel labelled:checkLabel do:boxOpeningBlock
+    "launch a Dialog to warn or request something. 
+     Add a checkbox on a value holder."
+
+    self 
+        modifyingBoxWith:[:box |
+            box verticalPanel add:((CheckBox label:checkLabel) model:checkModel).
+        ] 
+        do:boxOpeningBlock.
+
+    "
+     |h|
+     h := true asValue.
+     Dialog 
+        withCheckBoxFor:h 
+        labelled:'another choice' 
+        do:[ Dialog confirm:'some question' ].
+    "
+
+    "Created: / 10-09-2017 / 12:26:07 / cg"
+!
+
 withOptoutOption:optOutAction1 labelled:labelString1 
     andOptoutOption:optOutAction2 labelled:labelString2
     do:boxOpeningBlock