FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour incremental search on Xbrowse
Posts: 181
Joined: Thu Apr 17, 2008 02:38 PM
incremental search on Xbrowse
Posted: Sat Mar 23, 2024 02: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 (fw): Select all Collapse
 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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: incremental search on Xbrowse
Posted: Sat Mar 23, 2024 08:22 PM

We'll look into this

Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: incremental search on Xbrowse
Posted: Mon Mar 25, 2024 03: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
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: incremental search on Xbrowse
Posted: Mon Mar 25, 2024 01: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

Posts: 181
Joined: Thu Apr 17, 2008 02:38 PM
Re: incremental search on Xbrowse
Posted: 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

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: incremental search on Xbrowse
Posted: Tue Mar 26, 2024 03: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 (fw): Select all Collapse
         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
Posts: 181
Joined: Thu Apr 17, 2008 02:38 PM
Re: incremental search on Xbrowse
Posted: Tue Mar 26, 2024 12:28 PM
Hi Master Rao,
The fix works perfectly!
:D
TIA
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: incremental search on Xbrowse
Posted: Tue Mar 26, 2024 12:40 PM

Are you using MultiSelectCol?

Regards



G. N. Rao.

Hyderabad, India
Posts: 181
Joined: Thu Apr 17, 2008 02:38 PM
Re: incremental search on Xbrowse
Posted: Wed Mar 27, 2024 08: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

Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: incremental search on Xbrowse
Posted: Wed Mar 27, 2024 09: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 March-April 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
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: incremental search on Xbrowse
Posted: Wed Mar 27, 2024 09: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 (fw): Select all Collapse
         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 March-April 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

Continue the discussion