.
--- a/Button.st Mon Sep 18 12:39:22 1995 +0200
+++ b/Button.st Thu Sep 21 13:54:14 1995 +0200
@@ -39,7 +39,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/Button.st,v 1.31 1995-09-18 10:37:57 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Button.st,v 1.32 1995-09-21 11:53:36 claus Exp $
'!
!Button class methodsFor:'documentation'!
@@ -60,7 +60,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/Button.st,v 1.31 1995-09-18 10:37:57 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Button.st,v 1.32 1995-09-21 11:53:36 claus Exp $
"
!
@@ -1104,7 +1104,9 @@
(i.e. windows buttons)."
self
+ extent:(labelWidth @ labelHeight);
sizeFixed:true;
+ borderWidth:0;
onLevel:0;
offLevel:0;
horizontalSpace:0;
@@ -1112,6 +1114,7 @@
newLayout.
"Created: 17.9.1995 / 20:41:47 / claus"
+ "Modified: 19.9.1995 / 16:34:08 / claus"
!
onLevel:aNumber
--- a/EditField.st Mon Sep 18 12:39:22 1995 +0200
+++ b/EditField.st Thu Sep 21 13:54:14 1995 +0200
@@ -27,7 +27,7 @@
COPYRIGHT (c) 1990 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.28 1995-09-07 12:44:43 claus Exp $
+$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.29 1995-09-21 11:53:48 claus Exp $
'!
!EditField class methodsFor:'documentation'!
@@ -48,7 +48,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.28 1995-09-07 12:44:43 claus Exp $
+$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.29 1995-09-21 11:53:48 claus Exp $
"
!
@@ -620,10 +620,11 @@
^ list at:1
!
-entryCompletionBlock:aBlock
- "define an action to be evaluated when Tab (NameCompletion) is pressed"
+entryCompletionBlock:aOneArgBlock
+ "define an action to be evaluated when Tab (NameCompletion) is pressed.
+ The block gets the current contents as argument."
- entryCompletionBlock := aBlock
+ entryCompletionBlock := aOneArgBlock
!
leaveAction:aBlock
@@ -1005,7 +1006,7 @@
<resource: #keyboard (#DeleteLine #EndOfText)>
- |leave xCol newOffset oldWidth newWidth|
+ |leave xCol newOffset oldWidth newWidth s|
enabled ifFalse:[
^ self
@@ -1019,7 +1020,13 @@
(key == #Tab) ifTrue:[
tabAction notNil ifTrue:[tabAction value. ^ self].
entryCompletionBlock notNil ifTrue:[
- entryCompletionBlock value. ^ self
+ s := self contents.
+ s isNil ifTrue:[
+ s := ''
+ ] ifFalse:[
+ s := s asString
+ ].
+ entryCompletionBlock value:s. ^ self
]
].
(key == #Return) ifTrue:[
--- a/RButtGrp.st Mon Sep 18 12:39:22 1995 +0200
+++ b/RButtGrp.st Thu Sep 21 13:54:14 1995 +0200
@@ -23,7 +23,7 @@
COPYRIGHT (c) 1991 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/Attic/RButtGrp.st,v 1.13 1995-09-07 12:45:50 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/RButtGrp.st,v 1.14 1995-09-21 11:54:14 claus Exp $
'!
!RadioButtonGroup class methodsFor:'documentation '!
@@ -44,7 +44,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/Attic/RButtGrp.st,v 1.13 1995-09-07 12:45:50 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/RButtGrp.st,v 1.14 1995-09-21 11:54:14 claus Exp $
"
!
@@ -130,6 +130,23 @@
top extent:(panel preferredExtent).
top open.
+ using checkBoxes (these have a label included):
+
+ |top panel toggle b g|
+
+ top := StandardSystemView new.
+ panel := VerticalPanelView origin:0.0@0.0 corner:1.0@1.0 in:top.
+ g := RadioButtonGroup new.
+ b := CheckBox label:'one' in:panel.
+ g add:b.
+ b := CheckBox label:'two' in:panel.
+ g add:b.
+ b := CheckBox label:'three' in:panel.
+ g add:b.
+ top extent:(panel preferredExtent).
+ top open.
+
+
example (operating on a model)
|selected dialog group|
@@ -145,8 +162,9 @@
dialog open.
dialog accepted ifTrue:[
Transcript showCr:'you selected: ' , selected value printString
+ ] ifFalse:[
+ Transcript showCr:'aborted'
]
-
"
! !
@@ -206,7 +224,8 @@
!RadioButtonGroup methodsFor:'update'!
update:something with:someArgument from:changedButton
- (self includes:changedButton) ifFalse:[^ self].
+ "/ no - it could be a subcomponent
+"/ (self includes:changedButton) ifFalse:[^ self].
"
a RadioButton in this group has changed - notify the others
@@ -243,6 +262,8 @@
value ifTrue:[newValue := index]
]
].
+ aToggle turnOn.
valueChannel value:newValue
+ "Modified: 20.9.1995 / 16:08:16 / claus"
! !
--- a/RadioButtonGroup.st Mon Sep 18 12:39:22 1995 +0200
+++ b/RadioButtonGroup.st Thu Sep 21 13:54:14 1995 +0200
@@ -23,7 +23,7 @@
COPYRIGHT (c) 1991 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/RadioButtonGroup.st,v 1.13 1995-09-07 12:45:50 claus Exp $
+$Header: /cvs/stx/stx/libwidg/RadioButtonGroup.st,v 1.14 1995-09-21 11:54:14 claus Exp $
'!
!RadioButtonGroup class methodsFor:'documentation '!
@@ -44,7 +44,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/RadioButtonGroup.st,v 1.13 1995-09-07 12:45:50 claus Exp $
+$Header: /cvs/stx/stx/libwidg/RadioButtonGroup.st,v 1.14 1995-09-21 11:54:14 claus Exp $
"
!
@@ -130,6 +130,23 @@
top extent:(panel preferredExtent).
top open.
+ using checkBoxes (these have a label included):
+
+ |top panel toggle b g|
+
+ top := StandardSystemView new.
+ panel := VerticalPanelView origin:0.0@0.0 corner:1.0@1.0 in:top.
+ g := RadioButtonGroup new.
+ b := CheckBox label:'one' in:panel.
+ g add:b.
+ b := CheckBox label:'two' in:panel.
+ g add:b.
+ b := CheckBox label:'three' in:panel.
+ g add:b.
+ top extent:(panel preferredExtent).
+ top open.
+
+
example (operating on a model)
|selected dialog group|
@@ -145,8 +162,9 @@
dialog open.
dialog accepted ifTrue:[
Transcript showCr:'you selected: ' , selected value printString
+ ] ifFalse:[
+ Transcript showCr:'aborted'
]
-
"
! !
@@ -206,7 +224,8 @@
!RadioButtonGroup methodsFor:'update'!
update:something with:someArgument from:changedButton
- (self includes:changedButton) ifFalse:[^ self].
+ "/ no - it could be a subcomponent
+"/ (self includes:changedButton) ifFalse:[^ self].
"
a RadioButton in this group has changed - notify the others
@@ -243,6 +262,8 @@
value ifTrue:[newValue := index]
]
].
+ aToggle turnOn.
valueChannel value:newValue
+ "Modified: 20.9.1995 / 16:08:16 / claus"
! !