improved cursor position management

This commit is contained in:
Antonio Linares
1999-08-04 13:42:50 +00:00
parent edd50dc9fd
commit ea0d42529d

View File

@@ -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