If I search and the find position is not on the first page I lose the header and the row pointer.
xBrowse - incremental search
- Biel EA6DD
- Posts: 680
- Joined: Tue Feb 14, 2006 9:48 am
- Location: Mallorca
- Contact:
Thank you.
I have verion 07.11 and I can't find lRefreshOnlyData 2 times in the methode.
Regards,
Otto
METHOD Seek( cSeek ) CLASS TXBrowse
local uBook, uSeek
local nFor, nRows
local lRefresh
if ::bSeek == nil
return nil
endif
If cSeek == nil
if !Empty(::cSeek)
::cSeek := ""
If ::oSeek != nil
::oSeek:SetText("")
Endif
endif
return nil
Endif
uBook := Eval( ::bBookMark )
if !Eval( ::bSeek, cSeek )
Eval( ::bBookMark, uBook )
MsgBeep()
return nil
endif
if ::nRowSel > Eval( ::bKeyNo )
::nRowsel := 1
else
::lRefreshOnlyData := .t.
endif
::cSeek := cSeek
uSeek := Eval( ::bBookMark )
nRows := ::nDataRows
lRefresh := .t.
if ::oSeek != nil
::oSeek:SetText( cSeek )
endif
Eval( ::bBookMark, uBook )
Eval( ::bSkip, 1 - ::nRowSel )
for nFor := 1 to nRows
if Eval( ::bBookMark ) == uSeek
lRefresh := .f.
exit
endif
if Eval( ::bSkip, 1) == 0
exit
endif
next
if lRefresh
Eval( ::bBookMark, uSeek )
if ::bChange != nil
Eval( ::bChange, Self )
endif
// ::lRefreshOnlyData := .t.
::Super:Refresh(.f.)
else
Eval( ::bBookMark, uBook )
::DrawLine( .f. )
::nRowSel := nFor
Eval( ::bBookMark, uSeek )
if ::bChange != nil
Eval( ::bChange, Self )
endif
::DrawLine( .t. )
endif
if ::oVScroll != nil
::VSetPos( Eval( ::bKeyNo,,Self ) )
endif
return nil
I have verion 07.11 and I can't find lRefreshOnlyData 2 times in the methode.
Regards,
Otto
METHOD Seek( cSeek ) CLASS TXBrowse
local uBook, uSeek
local nFor, nRows
local lRefresh
if ::bSeek == nil
return nil
endif
If cSeek == nil
if !Empty(::cSeek)
::cSeek := ""
If ::oSeek != nil
::oSeek:SetText("")
Endif
endif
return nil
Endif
uBook := Eval( ::bBookMark )
if !Eval( ::bSeek, cSeek )
Eval( ::bBookMark, uBook )
MsgBeep()
return nil
endif
if ::nRowSel > Eval( ::bKeyNo )
::nRowsel := 1
else
::lRefreshOnlyData := .t.
endif
::cSeek := cSeek
uSeek := Eval( ::bBookMark )
nRows := ::nDataRows
lRefresh := .t.
if ::oSeek != nil
::oSeek:SetText( cSeek )
endif
Eval( ::bBookMark, uBook )
Eval( ::bSkip, 1 - ::nRowSel )
for nFor := 1 to nRows
if Eval( ::bBookMark ) == uSeek
lRefresh := .f.
exit
endif
if Eval( ::bSkip, 1) == 0
exit
endif
next
if lRefresh
Eval( ::bBookMark, uSeek )
if ::bChange != nil
Eval( ::bChange, Self )
endif
// ::lRefreshOnlyData := .t.
::Super:Refresh(.f.)
else
Eval( ::bBookMark, uBook )
::DrawLine( .f. )
::nRowSel := nFor
Eval( ::bBookMark, uSeek )
if ::bChange != nil
Eval( ::bChange, Self )
endif
::DrawLine( .t. )
endif
if ::oVScroll != nil
::VSetPos( Eval( ::bKeyNo,,Self ) )
endif
return nil
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Otto,
Use this code:
Use this code:
Code: Select all
METHOD Seek( cSeek ) CLASS TXBrowse
local uBook, uSeek
local nFor, nRows
local lRefresh
if ::bSeek == nil
return nil
endif
If cSeek == nil
if ! Empty( ::cSeek )
::cSeek := ""
If ::oSeek != nil
::oSeek:SetText( "" )
Endif
endif
return nil
Endif
uBook := Eval( ::bBookMark )
if !Eval( ::bSeek, cSeek )
Eval( ::bBookMark, uBook )
MsgBeep()
return nil
endif
if ::nRowSel > Eval( ::bKeyNo,, Self )
::nRowsel := 1
endif
::cSeek := cSeek
uSeek := Eval( ::bBookMark )
nRows := ::nDataRows
lRefresh := .t.
if ::oSeek != nil
::oSeek:SetText( cSeek )
endif
Eval( ::bBookMark, uBook )
Eval( ::bSkip, 1 - ::nRowSel )
for nFor := 1 to nRows
if Eval( ::bBookMark ) == uSeek
lRefresh := .f.
exit
endif
if Eval( ::bSkip, 1 ) == 0
exit
endif
next
if lRefresh
Eval( ::bBookMark, uSeek )
if ::bChange != nil
Eval( ::bChange, Self )
endif
::Super:Refresh( .F. )
else
Eval( ::bBookMark, uBook )
::DrawLine( .f. )
::nRowSel := nFor
Eval( ::bBookMark, uSeek )
if ::bChange != nil
Eval( ::bChange, Self )
endif
::DrawLine( .t. )
endif
if ::oVScroll != nil
::VSetPos( Eval( ::bKeyNo,,Self ) )
endif
return nil
- Biel EA6DD
- Posts: 680
- Joined: Tue Feb 14, 2006 9:48 am
- Location: Mallorca
- Contact:
Otto wrote:Thank you.
I have verion 07.11 and I can't find lRefreshOnlyData 2 times in the methode.
Regards,
Otto
METHOD Seek( cSeek ) CLASS TXBrowse
local uBook, uSeek
local nFor, nRows
local lRefresh
if ::bSeek == nil
return nil
endif
If cSeek == nil
if !Empty(::cSeek)
::cSeek := ""
If ::oSeek != nil
::oSeek:SetText("")
Endif
endif
return nil
Endif
uBook := Eval( ::bBookMark )
if !Eval( ::bSeek, cSeek )
Eval( ::bBookMark, uBook )
MsgBeep()
return nil
endif
if ::nRowSel > Eval( ::bKeyNo )
::nRowsel := 1
else
::lRefreshOnlyData := .t. //<======================here
endif
::cSeek := cSeek
uSeek := Eval( ::bBookMark )
nRows := ::nDataRows
lRefresh := .t.
if ::oSeek != nil
::oSeek:SetText( cSeek )
endif
Eval( ::bBookMark, uBook )
Eval( ::bSkip, 1 - ::nRowSel )
for nFor := 1 to nRows
if Eval( ::bBookMark ) == uSeek
lRefresh := .f.
exit
endif
if Eval( ::bSkip, 1) == 0
exit
endif
next
if lRefresh
Eval( ::bBookMark, uSeek )
if ::bChange != nil
Eval( ::bChange, Self )
endif
// ::lRefreshOnlyData := .t. //<===================here
::Super:Refresh(.f.)
else
Eval( ::bBookMark, uBook )
::DrawLine( .f. )
::nRowSel := nFor
Eval( ::bBookMark, uSeek )
if ::bChange != nil
Eval( ::bChange, Self )
endif
::DrawLine( .t. )
endif
if ::oVScroll != nil
::VSetPos( Eval( ::bKeyNo,,Self ) )
endif
return nil