2008-10-11 13:06 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/source/rtl/tget.prg
    ! fixed cursor positioning when new get item is added.
    ; added note about possible modification - Viktor, please verify it
This commit is contained in:
Przemyslaw Czerpak
2008-10-11 11:06:51 +00:00
parent 4176d85bb7
commit d93996a154
2 changed files with 23 additions and 0 deletions

View File

@@ -8,6 +8,11 @@
2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
*/
2008-10-11 13:06 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rtl/tget.prg
! fixed cursor positioning when new get item is added.
; added note about possible modification - Viktor, please verify it
2008-10-11 11:21 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/common/expropt2.c
* formatting and minor cleanup

View File

@@ -255,6 +255,8 @@ METHOD display() CLASS Get
LOCAL nOldCursor := SetCursor( SC_NONE )
LOCAL cBuffer
LOCAL nDispPos
LOCAL nRowPos
LOCAL nColPos
#ifdef HB_COMPAT_C53
LOCAL nPos
@@ -310,6 +312,16 @@ METHOD display() CLASS Get
IF nPos > 0
hb_dispOutAt( ::nCapRow, ::nCapCol + nPos - 1, SubStr( cCaption, nPos, 1 ), hb_ColorIndex( ::cColorSpec, GET_CLR_ACCEL ) )
ENDIF
/* should we set fixed cursor position here?
* The above code which can left cursor in the middle of shown screen
* suggests that we shouldn't. If necessary please fix me.
*/
/*
nRowPos := ::nCapRow
nColPos := ::nCapCol + len( cCaption )
*/
ENDIF
#endif
@@ -322,6 +334,9 @@ METHOD display() CLASS Get
iif( ::lHideInput, PadR( Replicate( SubStr( ::cStyle, 1, 1 ), Len( RTrim( cBuffer ) ) ), ::nDispLen ), SubStr( cBuffer, nDispPos, ::nDispLen ) ),;
hb_ColorIndex( ::cColorSpec, iif( ::hasFocus, GET_CLR_ENHANCED, GET_CLR_UNSELECTED ) ) )
nRowPos := ::nRow
nColPos := ::nCol + ::nDispLen
IF Set( _SET_DELIMITERS ) .AND. !::hasFocus
#ifdef HB_COMPAT_C53
hb_dispOutAt( ::nRow, ::nCol - 1, SubStr( Set( _SET_DELIMCHARS ), 1, 1 ), hb_ColorIndex( ::cColorSpec, GET_CLR_UNSELECTED ) )
@@ -331,11 +346,14 @@ METHOD display() CLASS Get
hb_dispOutAt( ::nRow, ::nCol - 1, SubStr( Set( _SET_DELIMCHARS ), 1, 1 ) )
hb_dispOutAt( ::nRow, ::nCol + ::nDispLen, SubStr( Set( _SET_DELIMCHARS ), 2, 1 ) )
#endif
++nColPos
ENDIF
ENDIF
IF ::nPos != 0
SetPos( ::nRow, ::nCol + ::nPos - nDispPos )
ELSEIF nRowPos != NIL
SetPos( nRowPos, nColPos )
ENDIF
::nOldPos := nDispPos