Page 1 of 1
incremental search on Xbrowse
Posted:
Sat Mar 23, 2024 2:16 pm
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 view
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
Re: incremental search on Xbrowse
Posted:
Sat Mar 23, 2024 8:22 pm
by nageswaragunupudi
We'll look into this
Re: incremental search on Xbrowse
Posted:
Mon Mar 25, 2024 3:58 am
by nageswaragunupudi
What is your FWH version?
Space is working with incremental search already without any changes in the current and recent versions.
Re: incremental search on Xbrowse
Posted:
Mon Mar 25, 2024 1:33 pm
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
Re: incremental search on Xbrowse
Posted:
Mon Mar 25, 2024 11:43 pm
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
Re: incremental search on Xbrowse
Posted:
Tue Mar 26, 2024 3:23 am
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 view
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 )
Re: incremental search on Xbrowse
Posted:
Tue Mar 26, 2024 12:28 pm
by mauri.menabue
Hi Master Rao,
The fix works perfectly!
TIA
Re: incremental search on Xbrowse
Posted:
Tue Mar 26, 2024 12:40 pm
by nageswaragunupudi
Are you using MultiSelectCol?
Re: incremental search on Xbrowse
Posted:
Wed Mar 27, 2024 8:59 am
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
Re: incremental search on Xbrowse
Posted:
Wed Mar 27, 2024 9:07 am
by Silvio.Falconi
scusa Mauri siccome mi interessa pure a me mi puoi raggiungere via mail che non ho capito bene
Re: incremental search on Xbrowse
Posted:
Wed Mar 27, 2024 9:18 am
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 view
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 "