With this sample, if I type GU for example, the Seek is not performed. I have to click on a column an type again to work.
Also, the button Clear does not work.
Thank you very much.
- Code: Select all Expand view
- #include "fivewin.ch"
#include "xbrowse.ch"
function main()
local cStr, oCn, oRs
cStr := "Driver={MySQL ODBC 3.51 Driver};Server=dolphintest.sitasoft.net;" + ;
"Database=dolphin_man;User=test_dolphin;Password=123456;Option=3;"
oCn := FW_OpenAdoConnection( cStr )
if oCn != nil
oRs := FW_OpenRecordSet( oCn, "select * from biblio order by titulo" )
if oRs = nil
msgstop("error opening")
oCn:Close()
RETURN NIL
endif
testLucas( oRs )
oRs:Close()
oRs := Nil
oCn:Close()
else
msgstop( "Failed to Connect the Server")
endif
QUIT
return nil
//----------------------------------------------------------------------------//
//-----------------------------------------------------------------------------
function testLucas( oRs )
local oDlg, oBrw, oCbx, oFont, nWild := 2
local nOpt := 1
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
DEFINE DIALOG oDlg SIZE 900,400 PIXEL ;
TITLE FWVERSION ;
FONT oFont
@ 30,10 XBROWSE oBrw SIZE -10,-10 PIXEL OF oDlg ;
DATASOURCE oRs AUTOCOLS AUTOSORT ;
CELL LINES NOBORDER
WITH OBJECT oBrw
:nMarqueeStyle := 4
:lIncrFilter := .t.
:lSeekWild := .t. //( nWild == 2 )
:cFilterFld := "titulo"
:nStretchCol := STRETCHCOL_WIDEST
:CreateFromCode()
END
@ 10, 80 SAY oBrw:oSeek PROMPT oBrw:cSeek SIZE 120,10 PIXEL OF oDlg ;
COLOR CLR_RED,CLR_YELLOW
@ 10, 300 BUTTON "Clean" ACTION (MSGALERT(oBrw:cSeek), oBrw:cSeek:= ( "" ) , oBrw:Refresh(), oBrw:SetFocus(), MSGALERT(oBrw:cSeek) ) PIXEL
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT ( oBrw:SetFocus(), .f. )
RELEASE FONT oFont
Return nil
//----------------------------------------------------------------------------//