incremental search on Xbrowse

Post Reply
User avatar
mauri.menabue
Posts: 157
Joined: Thu Apr 17, 2008 2:38 pm

incremental search on Xbrowse

Post by mauri.menabue »

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

 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
nageswaragunupudi
Posts: 10691
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: incremental search on Xbrowse

Post by nageswaragunupudi »

We'll look into this
Regards

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

Re: incremental search on Xbrowse

Post by nageswaragunupudi »

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

Re: incremental search on Xbrowse

Post by Rick Lipkin »

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
mauri.menabue
Posts: 157
Joined: Thu Apr 17, 2008 2:38 pm

Re: incremental search on Xbrowse

Post by mauri.menabue »

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
nageswaragunupudi
Posts: 10691
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: incremental search on Xbrowse

Post by nageswaragunupudi »

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

         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
mauri.menabue
Posts: 157
Joined: Thu Apr 17, 2008 2:38 pm

Re: incremental search on Xbrowse

Post by mauri.menabue »

Hi Master Rao,
The fix works perfectly!
:D
TIA
User avatar
nageswaragunupudi
Posts: 10691
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: incremental search on Xbrowse

Post by nageswaragunupudi »

Are you using MultiSelectCol?
Regards

G. N. Rao.
Hyderabad, India
User avatar
mauri.menabue
Posts: 157
Joined: Thu Apr 17, 2008 2:38 pm

Re: incremental search on Xbrowse

Post by mauri.menabue »

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
Silvio.Falconi
Posts: 7103
Joined: Thu Oct 18, 2012 7:17 pm

Re: incremental search on Xbrowse

Post by Silvio.Falconi »

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: 7103
Joined: Thu Oct 18, 2012 7:17 pm

Re: incremental search on Xbrowse

Post by Silvio.Falconi »

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

         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
Post Reply