incremental search on Xbrowse

incremental search on Xbrowse

Postby mauri.menabue » Sat Mar 23, 2024 2:16 pm

Hi all,
Is it possible to modify xbrowse so that it can also accept the 'space' character in the 'seek' search string?
This change would allow searches even with 2 or more words.


Code: Select all  Expand view  RUN

 xbrowse vers. :
 #define FWVERSION    "FWH 23.10"
 #define FW_VersionNo 23101


 298  DATA nSortSecs    INIT 0
 299  DATA lSeekSpace   INIT .T.   <------- new row


 3879        cKey := Chr( nKey )
 3880        oCol := ::SelectedCol()
 3881        if nKey == 32 .and. ::nMarqueeStyle <= MARQSTYLE_HIGHLROWRC .and. ;
 3882                    oCol:hChecked .and. oCol:lEditable .and.   ----------->   .not. ::lSeekSpace
 3883           oCol:CheckToggle()
 3884        elseif nKey == 32 .and. !::lFastEdit .and. ::oMultiSelCol != nil  ------------> .and. .not. ::lSeekSpace
 3885           ::SelectRow( 2 )
 3886        elseif ( ::lFastEdit .or. nKey == Asc( '=' ) ) .and. ;
 3887           ( ::nMarqueeStyle <= MARQSTYLE_HIGHLROWRC .or. ::bClrRowFocus != nil ) .and. ;
 3888           oCol:lEditable .and. oCol:IsEditKey( nKey ) //cKey )
 


TIA
User avatar
mauri.menabue
 
Posts: 155
Joined: Thu Apr 17, 2008 2:38 pm

Re: incremental search on Xbrowse

Postby nageswaragunupudi » Sat Mar 23, 2024 8:22 pm

We'll look into this
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: incremental search on Xbrowse

Postby nageswaragunupudi » Mon Mar 25, 2024 3:58 am

What is your FWH version?

Space is working with incremental search already without any changes in the current and recent versions.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: incremental search on Xbrowse

Postby Rick Lipkin » Mon Mar 25, 2024 1:33 pm

Mauri

Have a look at the samples AdoRick.prg .... sample uses ado but I think you may be able to modify to use dbfcdx ..

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: incremental search on Xbrowse

Postby mauri.menabue » Mon Mar 25, 2024 11:43 pm

hi Nages,
The my FWH version is 23.10 but as already posted the condition under which the space is discarded is

if nKey == 32 .and. ::nMarqueeStyle <= MARQSTYLE_HIGHLROWRC .and. oCol:hChecked .and. oCol:lEditable
...
elseif nKey == 32 .and. !::lFastEdit .and. ::oMultiSelCol != nil

TIA
User avatar
mauri.menabue
 
Posts: 155
Joined: Thu Apr 17, 2008 2:38 pm

Re: incremental search on Xbrowse

Postby nageswaragunupudi » Tue Mar 26, 2024 3:23 am

Are you trying incrseek when either the focus is on an editable setcheck column or when you have a multisel column ?

Please try this change
Code: Select all  Expand view  RUN
        if nKey == 32 .and. ::nMarqueeStyle <= MARQSTYLE_HIGHLROWRC .and. ;
                     oCol:hChecked .and. oCol:lEditable .and. Empty( ::cSeek )

            oCol:CheckToggle()
         elseif nKey == 32 .and. !::lFastEdit .and. ::oMultiSelCol != nil .and. Empty( ::cSeek )
            ::SelectRow( 2 )
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: incremental search on Xbrowse

Postby mauri.menabue » Tue Mar 26, 2024 12:28 pm

Hi Master Rao,
The fix works perfectly!
:D
TIA
User avatar
mauri.menabue
 
Posts: 155
Joined: Thu Apr 17, 2008 2:38 pm

Re: incremental search on Xbrowse

Postby nageswaragunupudi » Tue Mar 26, 2024 12:40 pm

Are you using MultiSelectCol?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: incremental search on Xbrowse

Postby mauri.menabue » Wed Mar 27, 2024 8:59 am

Hi Rao,
yes,
this is default in my Std management of table,

::oBrw:SetMultiSelectCol( )

I rarely disable it using the property :

::oBrw:oMultiSelCol:lReadOnly := .T.

TIA
User avatar
mauri.menabue
 
Posts: 155
Joined: Thu Apr 17, 2008 2:38 pm

Re: incremental search on Xbrowse

Postby Silvio.Falconi » Wed Mar 27, 2024 9:07 am

scusa Mauri siccome mi interessa pure a me mi puoi raggiungere via mail che non ho capito bene
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: 7070
Joined: Thu Oct 18, 2012 7:17 pm

Re: incremental search on Xbrowse

Postby Silvio.Falconi » Wed Mar 27, 2024 9:18 am

nageswaragunupudi wrote:Are you trying incrseek when either the focus is on an editable setcheck column or when you have a multisel column ?

Please try this change
Code: Select all  Expand view  RUN
        if nKey == 32 .and. ::nMarqueeStyle <= MARQSTYLE_HIGHLROWRC .and. ;
                     oCol:hChecked .and. oCol:lEditable .and. Empty( ::cSeek )

            oCol:CheckToggle()
         elseif nKey == 32 .and. !::lFastEdit .and. ::oMultiSelCol != nil .and. Empty( ::cSeek )
            ::SelectRow( 2 )
 



Nages
I'm also interested in this change, I would also like to search for a word within the fields, how can I do it?

I normally use get (cseek) and combo to change the field to search and I use multiselectcol
I would like to add to the normal ( combobox) search "entries starting with " and "entries containing "
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: 7070
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

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