My customer wish have 3 Get ( first,last,City) and search these data on xbrowse
I wish the final user can insert a letter on one of the 3 gets and the procedure must search the data and refresh the xbrowse
I try with a small test but it not run ok ( or I not understtod how make it)
I try to search a sample on this forum but i not found any test for implement my app
this is the test
- Code: Select all Expand view RUN
#include 'fivewin.ch'
#include 'xbrowse.ch'
REQUEST DBFCDX
REQUEST DBFFPT
EXTERNAL ORDKEYNO,ORDKEYCOUNT,ORDCREATE,ORDKEYGOTO
function Main()
local oDlg, oBrw, oFont
//to search a record
Local oSaySearch:= array(3)
Local aGetSearch:= array(3)
Local cSearcFirst,cSearchLast,cSearchCity
// for the search
cSearcFirst:=space(15)
cSearchLast:=space(15)
cSearchCity:=space(15)
RddSetDefault( "DBFCDX" )
USE CUSTOMER ALIAS CUST
DEFINE FONT oFont NAME 'Tahoma' SIZE 0, -14
DEFINE DIALOG oDlg SIZE 640,440 PIXEL ;
FONT oFont TITLE 'XBrowse Search test'
@ 10, 10 XBROWSE oBrw OF oDlg SIZE 300, 180 PIXEL ;
AUTOCOLS ALIAS 'CUST' NOBORDER
oBrw:nMarqueeStyle = MARQSTYLE_HIGHLWIN7
oBrw:CreateFromCode()
@ 200, 10 say oSaySearch[1] Prompt "First:" of oDlg Size 40,10 PIXEL
@ 200, 120 say oSaySearch[2] Prompt "Last:" of oDlg Size 40,10 PIXEL
@ 200, 210 say oSaySearch[3] Prompt "City:" of oDlg Size 40,10 PIXEL
@ 200, 50 GET aGetSearch[1] VAR cSearcFirst of oDlg Size 60,12 PIXEL ;
ON CHANGE (oBrw:bseek(Upper(cSearcFirst)),oBrw:refresh())
@ 200, 140 GET aGetSearch[2] VAR cSearchLast of oDlg Size 60,12 PIXEL
@ 200, 250 GET aGetSearch[3] VAR cSearchCity of oDlg Size 60,12 PIXEL
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
return nil