FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xbrowse and lIncrFilter
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM

xbrowse and lIncrFilter

Posted: Sun Apr 03, 2016 01:05 PM
Hi,

I wanted to modify xbincflt.prg so that the search-promp display something like

Code (fw): Select all Collapse
*string*

instead of
Code (fw): Select all Collapse
string

if lSeekWild is on.

I modify the line
Code (fw): Select all Collapse
@ 11,160 SAY oBrw:oSeek PROMPT oBrw:cSeek SIZE 200,10 PIXEL ;
      OF oDlg COLOR CLR_BLACK,CLR_YELLOW PICTURE '@!'

to
Code (fw): Select all Collapse
@ 11,160 SAY oBrw:oSeek PROMPT '*'+oBrw:cSeek+'*' SIZE 200,10 PIXEL ;
      OF oDlg COLOR CLR_BLACK,CLR_YELLOW PICTURE '@!'

but this doesn't work.

At the begin it shows **, but then it I type something, I just see the search string.
How can I modify this?
Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM

Re: xbrowse and lIncrFilter

Posted: Sun Apr 03, 2016 02:03 PM

Actually specifying a value in the PROMPT clause has no effect. It is only for our understanding.
The value of the oSeek is set inside the xbrowse with oSeek:SetText( ::cSeek ).

The program works the same way even we write PROMPT "". Please try it.
So at the moment there is no way of our modifying the displayed text.

Regards



G. N. Rao.

Hyderabad, India
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM

Re: xbrowse and lIncrFilter

Posted: Sun Apr 03, 2016 09:09 PM
Marc

Have a look at AdoRick.prg .. I use the results of a field as you are typing with :GetText() and evaluate the results and use Ado Filter to simulate the incremental search.

Rick Lipkin

Code (fw): Select all Collapse
REDEFINE GET oLname var cLname ID 153 of oFld:aDialogs[1] ;
         ON CHANGE ( _Isearch( oLname, cLname, oLbx, oRsCust )) UPDATE

//-------------

Static Func _Isearch( oLname1, cLname1, oBrw, oRsCust )

  cLname1 = Alltrim( oLName1:GetText() )

  if Empty( cLname1 )
     return .T.
  endif   

   oRsCust:Filter := "[Last Name] like '"+cLname1+"%'"

   oBrw:ReFresh()

Return .T.

Continue the discussion