Kjell,
Putting this in your keypress() method will cause it to behave like the editbox (you can put it in your baseclass):
LPARAMETERS nKeyCode, nShiftAltCtrl
if nKeyCode = 4 and nshiftaltctrl = 0
with this
if .selLength > 0
.selStart = .selStart + .selLength
nodefault
endif
endwith
endif
>Yes, I just tested the same in an editbox, and it worked as it schould.
>But it dont work in a textboxes.
>When I press right arrow, the insertpoint will be between 4 and 5,
>and when I press the left arrow the insertpoint is between 2 and 3.
>
Steve Gibson