--- a/DialogBox.st Tue Mar 05 01:29:34 1996 +0100
+++ b/DialogBox.st Tue Mar 05 01:41:39 1996 +0100
@@ -2211,9 +2211,56 @@
"Created: 9.2.1996 / 22:20:31 / cg"
!
+addComboBoxOn:aModel
+ "create a comboBoxView on aModel and add it.
+ Returns the comboBoxView."
+
+ ^ self addComboBoxOn:aModel tabable:true
+
+ "
+ without a list, the comboBox is disabled:
+
+ |box val|
+
+ val := 'some input' asValue.
+
+ box := Dialog new.
+
+ (box addTextLabel:'combo box example') adjust:#left.
+ box addVerticalSpace.
+ (box addComboBoxOn:val).
+ box addOkButton.
+ box open.
+ box accepted ifTrue:[
+ Transcript showCr:val value
+ ].
+ "
+
+ "with a list, it can be pulled:
+
+ |box val|
+
+ val := '' asValue.
+
+ box := Dialog new.
+
+ (box addTextLabel:'combo box example') adjust:#left.
+ box addVerticalSpace.
+ (box addComboBoxOn:val) list:#('one' 'two' 'three' 'four').
+ box addOkButton.
+ box open.
+ box accepted ifTrue:[
+ Transcript showCr:val value
+ ].
+ "
+
+ "Modified: 28.2.1996 / 15:17:39 / cg"
+ "Created: 4.3.1996 / 17:21:45 / cg"
+!
+
addComboBoxOn:aModel tabable:tabable
- "create a comboBox on aModel and add it.
- Returns the box."
+ "create a comboBoxView on aModel and add it.
+ Returns the comboBoxView."
|f|
@@ -2262,12 +2309,58 @@
].
"
- "Modified: 28.2.1996 / 15:17:39 / cg"
+ "Modified: 4.3.1996 / 17:21:57 / cg"
+!
+
+addComboListOn:aModel
+ "create a comboListView on aModel and add it.
+ Returns the comboListView."
+
+ ^ self addComboListOn:aModel tabable:true
+
+ "without a list, the comboList is disabled:
+
+ |box val|
+
+ val := 'some input' asValue.
+
+ box := Dialog new.
+
+ (box addTextLabel:'combo list example') adjust:#left.
+ box addVerticalSpace.
+ (box addComboListOn:val).
+ box addOkButton.
+ box open.
+ box accepted ifTrue:[
+ Transcript showCr:val value
+ ].
+ "
+
+ "with a list, it can be pulled:
+
+ |box val|
+
+ val := '' asValue.
+
+ box := Dialog new.
+
+ (box addTextLabel:'combo box example') adjust:#left.
+ box addVerticalSpace.
+ (box addComboListOn:val) list:#('one' 'two' 'three' 'four').
+ box addOkButton.
+ box open.
+ box accepted ifTrue:[
+ Transcript showCr:val value
+ ].
+ "
+
+ "Created: 28.2.1996 / 15:16:34 / cg"
+ "Modified: 4.3.1996 / 17:22:59 / cg"
!
addComboListOn:aModel tabable:tabable
- "create a comboList on aModel and add it.
- Returns the box."
+ "create a comboListView on aModel and add it.
+ Returns the comboListView."
|f|
@@ -2304,7 +2397,7 @@
(box addTextLabel:'combo box example') adjust:#left.
box addVerticalSpace.
- (box addComboBoxOn:val tabable:true) list:#('one' 'two' 'three' 'four').
+ (box addComboListOn:val tabable:true) list:#('one' 'two' 'three' 'four').
box addOkButton.
box open.
box accepted ifTrue:[
@@ -2313,7 +2406,7 @@
"
"Created: 28.2.1996 / 15:16:34 / cg"
- "Modified: 28.2.1996 / 15:22:47 / cg"
+ "Modified: 4.3.1996 / 17:23:38 / cg"
!
addComponent:aComponent
@@ -3670,5 +3763,5 @@
!DialogBox class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.51 1996-03-05 00:21:01 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.52 1996-03-05 00:41:39 cg Exp $'
! !