On an incremental search
CASE IsRange( nKey, 32, 127 ) .AND. cFilterKey != NIL .AND. cnSQL:RecordCount() != 0
IF Chr( nKey ) $ ['/*]
nKey := 32
ENDIF
cFilter += Upper( Chr( nKey ) )
IF ! ADOFilter( cnSQL, cFilterKey, cFilter, aADOFilterList, nADOFilterPos )
cFilter := Left( cFilter, Len( cFilter ) - 1 )
IF Len( cFilter ) == 0
cnSQL:Filter( "" )
ELSE
ADOFilter( cnSQL, cFilterKey, cFilter, aADOFilterList, nADOFilterPos )
ENDIF
ENDIF
oBrowse:SetArray( Array( cnSQL:RecordCount() ) )
oLabel:Varput( cFilter )
oLabel:Refresh()
oBrowse:Refresh()
ENDCASEIf I type 2 or more letters, a unique refresh at the end speed up screen update.
On a harbour GT tbrowse, I can do this:
oBrowse:RefreshCurrent()
nkey := 0
DO WHILE nkey == 0 .AND. ! oBrowse:Stable
oBrowse:Stabilize()
nkey := Inkey()
ENDDOOn this way, I update only if no more keys pressed, or update later on ENTER or Click.
How I can optimize xbrowse update on same situation?
Note: array is used only to have size, with Nil elements.
José M. C. Quintas Brazil
gtwvg, fivewin 25.12, hwgui, mingw 15.2 (32 bits)