--- a/EditField.st Wed Oct 13 02:01:27 1993 +0100
+++ b/EditField.st Wed Oct 13 02:04:14 1993 +0100
@@ -26,7 +26,7 @@
and forcing its size to 1 line - disabling cursor movement
in the vertical direction.
-%W% %E%
+$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.2 1993-10-13 01:01:54 claus Exp $
written jan-90 by claus
'!
@@ -54,10 +54,7 @@
super initStyle.
- myBgColor := Resource name:'EDITFIELD_BACKGROUND'
- default:nil
- fromFile:'Smalltalk.rs'.
-
+ myBgColor := resources name:'BACKGROUND' default:nil.
myBgColor notNil ifTrue:[
bgColor := myBgColor on:device.
self viewBackground:bgColor.
@@ -65,10 +62,7 @@
selectionBgColor := White on:device
].
- myFont := Resource name:'EDITFIELD_FONT'
- default:nil
- fromFile:'Smalltalk.rs'.
-
+ myFont := resources name:'FONT' default:nil.
myFont notNil ifTrue:[
font := myFont
]
@@ -224,7 +218,7 @@
"if keyHandler is defined, pass input; otherwise check for leave
keys"
- |leave x|
+ |leave xCol|
enabled ifFalse:[
(keyboardHandler notNil
@@ -255,13 +249,13 @@
^ self
].
super keyPress:key x:x y:y.
- x := (self xOfCol:cursorCol inLine:cursorLine) - leftOffset.
- (x > (width * (5/6))) ifTrue:[
+ xCol := (self xOfCol:cursorCol inLine:cursorLine) - leftOffset.
+ (xCol > (width * (5/6))) ifTrue:[
leftOffset := leftOffset + (width // 2).
self clear.
self redraw
] ifFalse:[
- (x < (width * (1/6))) ifTrue:[
+ (xCol < (width * (1/6))) ifTrue:[
leftOffset := 0 max: leftOffset - (width // 2).
self clear.
self redraw