xbrowse and lIncrFilter

xbrowse and lIncrFilter

Postby Marc Vanzegbroeck » Sun Apr 03, 2016 1:05 pm

Hi,

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

Code: Select all  Expand view
*string*

instead of
Code: Select all  Expand view
string

if lSeekWild is on.

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

to
Code: Select all  Expand view
@ 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
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: xbrowse and lIncrFilter

Postby nageswaragunupudi » Sun Apr 03, 2016 2: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
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xbrowse and lIncrFilter

Postby Rick Lipkin » Sun Apr 03, 2016 9: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: Select all  Expand view

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.
 
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 117 guests