From ea0d42529dc00bc0d95c4a67449bfe86c419cb70 Mon Sep 17 00:00:00 2001 From: Antonio Linares Date: Wed, 4 Aug 1999 13:42:50 +0000 Subject: [PATCH] improved cursor position management --- harbour/source/rtl/tget.prg | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/harbour/source/rtl/tget.prg b/harbour/source/rtl/tget.prg index 4279aaa928..0311cf695b 100644 --- a/harbour/source/rtl/tget.prg +++ b/harbour/source/rtl/tget.prg @@ -50,10 +50,10 @@ CLASS TGet METHOD VarGet() METHOD VarPut() - METHOD end() INLINE iif( ::hasFocus, (::pos := ::nMaxLen, ::Clear := .f.),) - METHOD home() INLINE iif( ::hasFocus, (::pos := 1,::Clear := .f.),) - MESSAGE left() METHOD _left() - MESSAGE right METHOD _right() + METHOD End() + METHOD Home() + MESSAGE Left() METHOD _left() + MESSAGE Right() METHOD _right() METHOD toDecPos() METHOD WordLeft() METHOD WordRight() @@ -197,6 +197,30 @@ return Self //---------------------------------------------------------------------------// +METHOD End() CLASS TGet + + if ::HasFocus + ::Pos := ::nMaxLen + ::Clear := .f. + SetPos( ::Row, ::Col + ::Pos - 1 ) + endif + +return nil + +//---------------------------------------------------------------------------// + +METHOD Home() CLASS TGet + + if ::HasFocus + ::Pos := 1 + ::Clear := .f. + SetPos( ::Row, ::Col + ::Pos - 1 ) + endif + +return nil + +//---------------------------------------------------------------------------// + METHOD Reset() CLASS TGet if ::hasfocus