--- a/EnterBox2.st Tue Aug 30 00:54:47 1994 +0200
+++ b/EnterBox2.st Mon Oct 10 04:03:47 1994 +0100
@@ -1,6 +1,6 @@
"
COPYRIGHT (c) 1991 by Claus Gittinger
- All Rights Reserved
+ All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
@@ -19,9 +19,9 @@
EnterBox2 comment:'
COPYRIGHT (c) 1991 by Claus Gittinger
- All Rights Reserved
+ All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/EnterBox2.st,v 1.6 1994-08-23 23:37:01 claus Exp $
+$Header: /cvs/stx/stx/libwidg/EnterBox2.st,v 1.7 1994-10-10 03:01:23 claus Exp $
'!
!EnterBox2 class methodsFor:'documentation '!
@@ -29,7 +29,7 @@
copyright
"
COPYRIGHT (c) 1991 by Claus Gittinger
- All Rights Reserved
+ All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
@@ -42,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/EnterBox2.st,v 1.6 1994-08-23 23:37:01 claus Exp $
+$Header: /cvs/stx/stx/libwidg/EnterBox2.st,v 1.7 1994-10-10 03:01:23 claus Exp $
"
!
@@ -57,14 +57,14 @@
!EnterBox2 class methodsFor:'instance creation'!
title:titleString okText1:text1 okText2:text2 abortText:abortText
- action1:block1 action2:block2
+ action1:block1 action2:block2
"create and return a new EnterBox-with-2 buttons
and define its text, button-labels and actions"
^ (super title:titleString
- okText:text1
- abortText:abortText
- action:block1) okText2:text2 action2:block2
+ okText:text1
+ abortText:abortText
+ action:block1) okText2:text2 action2:block2
! !
!EnterBox2 methodsFor:'initialization'!
@@ -72,15 +72,18 @@
initialize
super initialize.
- okButton2 := Button label:''
- action:[
- okButton2 turnOffWithoutRedraw.
- self ok2Pressed
- ]
- in:buttonPanel.
+ "
+ add a second ok-button
+ "
+ okButton2 := Button okButtonIn:buttonPanel.
+ okButton2 action:[
+ okButton2 turnOffWithoutRedraw.
+ self ok2Pressed
+ ].
+ "
+ the old (see superclass) ok-button is not a return-button
+ "
okButton isReturnButton:false.
- okButton2 isReturnButton:true.
- okButton2 cursor:(Cursor thumbsUp).
self resize.
enterField leaveAction:[:key | self ok2Pressed]
@@ -110,9 +113,9 @@
"set the text to be displayed in the 2nd ok-button"
aString ~= okButton2 label ifTrue:[
- okButton2 label:aString.
- okButton2 resize.
- self resize
+ okButton2 label:aString.
+ okButton2 resize.
+ self resize
]
!