It isn't just 32 bit msvc with the problem, it exists in 64 bit as well.
Glad it works the same way on both compilers. As we are going to see it is not a problem, but it is the intended feature.
First, the order of using lSeekBar and lGetBar matters, even if the intent enable one and not the other.
lSeekBar and
lGetBar are mutually exclusive for obvious reasons. Purposefully the variables are created in such a way that only one of them can be set to .T. at a given time. This is to prevent programmers from setting both to .T. by mistake.
GetBarPurpose of GetBar is to create GETs in header bar for those columns which the programmer decides to be used for such purpose as he my decide. XBrowse only provides a place for the GET and does not do anything else with that GET. It is totally for the programmer to decide how he wants to use the value entered in the GET.
SeekBarWhether or not there is a seekbar, we all know that incremental seek is an inbuilt feature of XBrowse existing since many years. This works when
(a) AUTOSORT clause is used while creating XBrowse
(b) Database is sorted in the order of any one column. This is normally achieved by clicking on the header.
(c) When DBF is browsed, the DBF has to be indexed. Without index the data can not be sorted (ordered) in the order of any column. Other datasources like ADO, Array, MySql, etc do not need support of any index file.
(d) lFastEdit should be .f.
In such a case, whenever the user presses a key xbrowse seeks to the characters entered by the user.
XBrowse on its own does not display the entered value anywhere.
If the programmer desires to display the value then he needs to create a SAY like this:
@ r, c SAY oBrw:oSeek VAR oBrw:cSeek SIZE w,h PIXEL OF <someoWnd/oDlg>. When this SAY is created, XBrowse automatically displays the Seek Value in the SAY whenever user presses a valid key.
Now, instead of creating a SAY elsewhere, the programmer has another option to set oBrw:lSeekBar := .t.. In this case XBrowse automatically displays the seek value on the top of the "sorted" column in the header bar.
Now we can see that there is no problem and that the lSeekBar is working as intended.
Is it possible to change the bmp in the seek bar from the hour glass to whatever else want?
In this version it is not possible, but we plan to provide this in the next version.
Is it possible to change the filter type it uses to instead of being a left to right match as the user types, to instead do a substring filter?
Seek:By default Seek works from left to right.
If oBrw:lSeekWild is set to .T., the record pointer moves to the first record where the value of the field contains the seek value anywhere inside. Eg. if the user enters "AU", matches with "PAUL" (Case insensitive)
Filter:Instead of Incremental Seek(Search) it is also possible to have Incremental Filters.
For this purpose we need to set:
- Code: Select all Expand view
oBrw:lIncrFilter := .t.
oBrw:cFilterFld := <fieldname> // eg: oBrw:cFilterFld := "CITY"
(By default currently sorted sortkey is used)
If we want the seek value to be displayed in the Bar, we also need to set
- Code: Select all Expand view
oBrw:oFilterCol := oBrw:oCol( "city" )
By default this filters the datasource to display only values matching the expression entered by the user.
Entry "AU" results in display of all values starting with "AU" // case insensitive
If we set oBrw:lSeekWild := .t. also
Entry "AU" results in display of all values containing "AU" anywhere inside the value.
All these features are available for the last many years. What is now new is only display of the seek value in the header bar.