#DOCUMENTATION by exept
class: DialogBox class
comment/format in:
#choose:fromList:lines:initialSelection:
#choose:fromList:lines:initialSelection:title:
--- a/DialogBox.st Sat Sep 14 17:59:10 2019 +0200
+++ b/DialogBox.st Sun Sep 15 09:35:07 2019 +0200
@@ -5767,7 +5767,8 @@
The user can select an item and click ok; in this case, the value
from list is returned (doubleclick works as well).
If cancel is pressed, the value of cancelBlock is returned.
- Pressing ok without a selection is treated like cancel."
+ Pressing ok without a selection is treated like cancel.
+ Initially, the value given by initialSelection is selected (a value from list, not an index)"
^ self
choose:aString
@@ -5793,10 +5794,11 @@
choose:aString fromList:list lines:maxLines initialSelection:initialSelection title:windowTitle
"launch a Dialog showing the message and list.
- The user can select an item and click ok; in this case, the value
- from list is returned (doubleclick works as well).
+ The user can select an item and click ok;
+ in this case, the value from list is returned (doubleclick works as well).
If cancel is pressed, the value of cancelBlock is returned.
- Pressing ok without a selection is treated like cancel."
+ Pressing ok without a selection is treated like cancel.
+ Initially, the value given by initialSelection is selected (a value from list, not an index)"
^ self
choose:aString
@@ -5814,8 +5816,9 @@
Transcript showCR:(
Dialog
choose:'choose any'
- fromList:#(1 2 3 4 5 6 7)
+ fromList:#(10 20 30 40 50 60 70)
lines:4
+ initialSelection:30
title:'Choose'
)
"