2000-11-20 17:38 GMT+1 Maurilio Longo <maurilio.longo@libero.it>
This commit is contained in:
@@ -1,3 +1,13 @@
|
||||
2000-11-20 17:38 GMT+1 Maurilio Longo <maurilio.longo@libero.it>
|
||||
* source/rtl/tbrowse.prg
|
||||
! ::aRedraw[] can change its size if header/footer separators are added/removed
|
||||
during object life. ::Configure() can now handle this.
|
||||
! ::PageDown() could set ::RowPos past ::RowCount. Fixed.
|
||||
* contrib/mysql/tmysql.prg
|
||||
! fixed ::Skip() error when at eof().
|
||||
* contrib/mysql/tsqlbrw.prg
|
||||
! missing ::Configure() call
|
||||
|
||||
2000-11-18 11:11 GMT+1 Maurilio Longo <maurilio.longo@libero.it>
|
||||
* source/rtl/tbrowse.prg
|
||||
* drawing headers and footers is not needed if columns on screen don't change,
|
||||
|
||||
@@ -378,7 +378,7 @@ METHOD Skip(nRows) CLASS TMySQLQuery
|
||||
|
||||
else
|
||||
// positive movement
|
||||
::nCurRow := Min(::nCurRow + nRows, ::nNumRows + 1)
|
||||
::nCurRow := Min(::nCurRow + nRows, ::nNumRows)
|
||||
|
||||
endif
|
||||
|
||||
|
||||
@@ -390,4 +390,5 @@ return Self
|
||||
// Empty method to be subclassed
|
||||
METHOD KeyboardHook(nKey) CLASS TBrowseSQL
|
||||
|
||||
|
||||
return Self
|
||||
|
||||
@@ -197,6 +197,12 @@ METHOD New(nTop, nLeft, nBottom, nRight) CLASS TBrowse
|
||||
|
||||
return Self
|
||||
|
||||
METHOD Invalidate() CLASS TBrowse
|
||||
|
||||
AFill(::aRedraw, .F. )
|
||||
::Stable := .F.
|
||||
|
||||
return Self
|
||||
|
||||
METHOD Configure(nMode) CLASS TBrowse
|
||||
|
||||
@@ -222,6 +228,17 @@ METHOD Configure(nMode) CLASS TBrowse
|
||||
endif
|
||||
next
|
||||
|
||||
// 20/nov/2000 - maurilio.longo@libero.it
|
||||
// If I add (or remove) header or footer separator I have to change number
|
||||
// of available rows
|
||||
::RowCount := ::nBottom - ::nTop + 1 - iif( ::lHeaders, 1, 0 ) - ;
|
||||
iif( ::lFooters, 1, 0 ) - iif( Empty( ::HeadSep ), 0, 1 ) - ;
|
||||
iif( Empty( ::FootSep ), 0, 1 )
|
||||
|
||||
if Len(::aRedraw) <> ::RowCount
|
||||
::aRedraw := Array(::RowCount)
|
||||
endif
|
||||
|
||||
::Invalidate()
|
||||
|
||||
return Self
|
||||
@@ -265,8 +282,8 @@ METHOD Down() CLASS TBrowse
|
||||
if Eval( ::SkipBlock, 1 ) != 0
|
||||
if ::RowPos < ::RowCount
|
||||
::RowPos++
|
||||
::Hilite()
|
||||
::RelativePos++
|
||||
::Hilite()
|
||||
else
|
||||
n := ::nTop + iif( ::lHeaders, 1, 0 ) + iif( Empty( ::HeadSep ), 0, 1 )
|
||||
Scroll( n, ::nLeft, n + ::RowCount - 1, ::nRight, 1 )
|
||||
@@ -334,19 +351,6 @@ METHOD Home() CLASS TBrowse
|
||||
|
||||
return Self
|
||||
|
||||
METHOD Invalidate() CLASS TBrowse
|
||||
|
||||
local n
|
||||
|
||||
::RowCount := ::nBottom - ::nTop + 1 - iif( ::lHeaders, 1, 0 ) - ;
|
||||
iif( ::lFooters, 1, 0 ) - iif( Empty( ::HeadSep ), 0, 1 ) - ;
|
||||
iif( Empty( ::FootSep ), 0, 1 )
|
||||
|
||||
AFill(::aRedraw, .F. )
|
||||
::Stable := .F.
|
||||
|
||||
return Self
|
||||
|
||||
METHOD _Right() CLASS TBrowse
|
||||
|
||||
if ::ColPos < ::rightVisible
|
||||
@@ -428,15 +432,17 @@ METHOD PageDown() CLASS TBrowse
|
||||
::HitTop := .F.
|
||||
if !::HitBottom
|
||||
if ( nDown := Eval( ::SkipBlock, ::RowCount ) ) != 0
|
||||
if nDown < ::RowCount
|
||||
::RefreshAll()
|
||||
if ::RowPos + nDown < ::RowCount
|
||||
::RowPos += nDown
|
||||
::RelativePos += nDown
|
||||
::RefreshAll()
|
||||
else
|
||||
::RowPos := ::RowCount
|
||||
::RelativePos := ::RowCount
|
||||
::RefreshAll()
|
||||
endif
|
||||
else
|
||||
::HitBottom := .t.
|
||||
::HitBottom := .T.
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -450,9 +456,9 @@ METHOD PageUp() CLASS TBrowse
|
||||
if !::HitTop
|
||||
if ( nUp := Abs( Eval( ::SkipBlock, - ::RowCount ) ) ) != 0
|
||||
if nUp < ::RowCount
|
||||
::RefreshAll()
|
||||
::RowPos := 1
|
||||
::RelativePos := 1
|
||||
::RefreshAll()
|
||||
else
|
||||
::RefreshAll()
|
||||
endif
|
||||
@@ -649,13 +655,6 @@ METHOD Stabilize() CLASS TBrowse
|
||||
|
||||
::rightVisible := nColsVisible
|
||||
|
||||
if Empty(::aRedraw)
|
||||
::RowCount := ::nBottom - ::nTop + 1 - iif( ::lHeaders, 1, 0 ) - ;
|
||||
iif( ::lFooters, 1, 0 ) - iif( Empty( ::HeadSep ), 0, 1 ) - iif( Empty( ::FootSep ), 0, 1 )
|
||||
::aRedraw := Array( ::RowCount )
|
||||
AFill( ::aRedraw, .F. )
|
||||
endif
|
||||
|
||||
else
|
||||
oCol := ::aColumns[ iif( ::rightVisible != 0, ::rightVisible, 1 ) ]
|
||||
oCol2 := ::aColumns[ iif( ::Freeze > 0, 1, ::leftVisible ) ]
|
||||
|
||||
Reference in New Issue
Block a user