Search on xbrowse

Search on xbrowse

Postby Silvio.Falconi » Sun Aug 05, 2018 5:44 pm

I wish make a search on xbrowse
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

#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
 
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7057
Joined: Thu Oct 18, 2012 7:17 pm

Re: Search on xbrowse

Postby ukoenig » Sun Aug 05, 2018 6:24 pm

Why not using a seekbar :?:

Image

USE CUSTOMER
ORDCREATE( ,"CUST1","UPPER(FIRST)", {|| UPPER(FIRST) } , .F. )
ORDCREATE( ,"CUST2","UPPER(LAST)", {|| UPPER(LAST) } , .F. )
ORDCREATE( ,"CUST3","DTOS(HIREDATE)", {|| DTOS(HIREDATE) } , .F. )
ORDCREATE( ,"CUST4","MARRIED", {|| MARRIED } , .F. )
ORDCREATE( ,"CUST5","STR(SALARY)", {|| STR(SALARY) } , .F. )

:lSeekBar := .t.
:bClrEdits := { || { CLR_HRED, CLR_YELLOW } }


regards
Uwe :?:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Search on xbrowse

Postby Silvio.Falconi » Sun Aug 05, 2018 9:25 pm

Please
I am not interested in searching over the bar. ( seekBar)

I have not been able to convince our customer to other solutions other than that decided by the customer

In fact I am recreating all the screens according to when decided by our customer.

Our client wants to have 3 gets one for the last name, one for the name and one for the city. when inserting a letter into one of the three it automatically gets the xbrowse to search and refresh
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7057
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 115 guests