EnterFieldGroup.st
changeset 125 3ffa271732f7
parent 122 04ec3fda7c11
child 126 40228f4fd66b
equal deleted inserted replaced
124:7abd3a234296 125:3ffa271732f7
    20 
    20 
    21 EnterFieldGroup comment:'
    21 EnterFieldGroup comment:'
    22 COPYRIGHT (c) 1992 by Claus Gittinger
    22 COPYRIGHT (c) 1992 by Claus Gittinger
    23 	      All Rights Reserved
    23 	      All Rights Reserved
    24 
    24 
    25 $Header: /cvs/stx/stx/libwidg/EnterFieldGroup.st,v 1.9 1995-05-07 00:15:50 claus Exp $
    25 $Header: /cvs/stx/stx/libwidg/EnterFieldGroup.st,v 1.10 1995-05-09 01:55:13 claus Exp $
    26 '!
    26 '!
    27 
    27 
    28 !EnterFieldGroup class methodsFor:'documentation'!
    28 !EnterFieldGroup class methodsFor:'documentation'!
    29 
    29 
    30 copyright
    30 copyright
    41 "
    41 "
    42 !
    42 !
    43 
    43 
    44 version
    44 version
    45 "
    45 "
    46 $Header: /cvs/stx/stx/libwidg/EnterFieldGroup.st,v 1.9 1995-05-07 00:15:50 claus Exp $
    46 $Header: /cvs/stx/stx/libwidg/EnterFieldGroup.st,v 1.10 1995-05-09 01:55:13 claus Exp $
    47 "
    47 "
    48 !
    48 !
    49 
    49 
    50 documentation
    50 documentation
    51 "
    51 "
   341 
   341 
   342     "set the fields enableAction to disable active field"
   342     "set the fields enableAction to disable active field"
   343 
   343 
   344     aField enableAction:[
   344     aField enableAction:[
   345 "/ Transcript showCr:'enable field with: ' , aField editValue.
   345 "/ Transcript showCr:'enable field with: ' , aField editValue.
   346 	currentField notNil ifTrue:[
   346 "/        currentField notNil ifTrue:[
   347 	    currentField disable
   347 "/            currentField disable
   348 	].
   348 "/        ].
   349 	currentField := aField
   349 "/        currentField := aField
       
   350 	self makeActive:aField
   350     ].
   351     ].
   351 
   352 
   352     "set the fields leaveAction to enable next field"
   353     "set the fields leaveAction to enable next field"
   353 
   354 
   354     aField leaveAction:[:key |
   355     aField leaveAction:[:key |
   470 
   471 
   471 keyPress:key x:x y:y view:aView
   472 keyPress:key x:x y:y view:aView
   472     "key-press in any field - forward the key to the active field"
   473     "key-press in any field - forward the key to the active field"
   473 
   474 
   474     currentField notNil ifTrue:[
   475     currentField notNil ifTrue:[
   475 	currentField keyPress:key x:0 y:0
   476 	currentField keyPress:key x:-1 y:-1
   476     ]
   477     ]
   477 !
   478 !
   478 
   479 
   479 buttonPress:button x:x y:y view:aView
   480 buttonPress:button x:x y:y view:aView
   480     "clicking on a field activates it and forwards the click to it"
   481     "clicking on a field activates it and forwards the click to it"