Page 2 of 2

Re: XBROWSE Column Question

PostPosted: Wed May 10, 2023 12:28 am
by nageswaragunupudi
how is the Syntax to use "Header - click" to SET Order / TAG :?:

Set
Code: Select all  Expand view
oBrw:lAutoSort := .t.  // default .f.

to invoke autosort feature.
We can also use AUTOSORT clause in the XBROWSE command, which sets the flag.
When autosort flag is ON, XBrowse automatically sorts the data on click of header, using the value in oCol:cSortOrder.
First click on the header sorts the data in ascending order.
Second click on the header sorts the data in descending order. In case of DBF, it uses the RDD function OrdDescend()

If oCol:cSortOrder is empty XBrowse does not attempt to sort.
Note: FWH2304 provides a way to sort such columns too. We discuss it in another topic.

Re: XBROWSE Column Question

PostPosted: Wed May 10, 2023 12:42 am
by nageswaragunupudi
when usig OrdWildSeek() in XBROWSE how to "continue" :?:
i did not found a 2nd OrdWildSeek() or a loop


No need for 2nd call or loop.
Code: Select all  Expand view
OrdWildSeek(oBrw:cSeek, oBrw:lSeekNext )
works for first seek and SeekNext automatically.

Note:Syntax
Code: Select all  Expand view
OrdWildSeek( cSeek, [lFromNextRec], [lBakwards]) --> lFound


Inspired by your postings, we introduced automatic SeekNext by pressing F3 key from FWH2304.
As of now, this works for arrays, DBF, TDatabase, all ADO rdbms, FW MySql. Yet to implement for dolphin,tmysql,eagle1,postgre, etc.

Re: XBROWSE Column Question

PostPosted: Wed May 10, 2023 7:20 am
by Marc Venken
Here is a sample for ordwildseek. It's new to me....

viewtopic.php?f=3&t=39965

Re: XBROWSE Column Question

PostPosted: Wed May 10, 2023 7:50 am
by nageswaragunupudi
Marc Venken wrote:Here is a sample for ordwildseek. It's new to me....

viewtopic.php?f=3&t=39965


Mr. Venken
OrdWildSeek( cSeek, ... ) is actually an (x)Harbour function in DBFNTX and DBFCDX RDDs, applicable for indexed DBFs.
We can seek expressions like "*A?C"

The above post refers to similar functionality we created in FWMaria library for MySql tables.
In fact, there was not problem that was solved in the post. He was not aware that we already implemented and we just clarified that it was implemented and working ok

Re: XBROWSE Column Question

PostPosted: Wed May 10, 2023 6:24 pm
by Jimmy
hi,
nageswaragunupudi wrote:
Code: Select all  Expand view
oBrw:lAutoSort := .t.  // default .f.

to invoke autosort feature.
We can also use AUTOSORT clause in the XBROWSE command, which sets the flag.

WOW, that is nice :D

nageswaragunupudi wrote:When autosort flag is ON, XBrowse automatically sorts the data on click of header, using the value in oCol:cSortOrder.
First click on the header sorts the data in ascending order.
Second click on the header sorts the data in descending order. In case of DBF, it uses the RDD function OrdDescend()

If oCol:cSortOrder is empty XBrowse does not attempt to sort.
Note: FWH2304 provides a way to sort such columns too. We discuss it in another topic.

ah, i did not know OrdDescend() as Xbase++ does not have it

Re: XBROWSE Column Question

PostPosted: Wed May 10, 2023 6:29 pm
by Jimmy
hi,
nageswaragunupudi wrote:No need for 2nd call or loop.
Code: Select all  Expand view
OrdWildSeek(oBrw:cSeek, oBrw:lSeekNext )
works for first seek and SeekNext automatically.

Note:Syntax
Code: Select all  Expand view
OrdWildSeek( cSeek, [lFromNextRec], [lBakwards]) --> lFound

but how can it continue without press a Key :?:

nageswaragunupudi wrote:Inspired by your postings, we introduced automatic SeekNext by pressing F3 key from FWH2304.

Yes, that would be fine, thx

Re: XBROWSE Column Question

PostPosted: Wed May 10, 2023 7:01 pm
by nageswaragunupudi
but how can it continue without press a Key :?:

SeekNext is performed when F3 key is pressed by the user.

Re: XBROWSE Column Question

PostPosted: Wed May 10, 2023 7:22 pm
by Jimmy
hi,
nageswaragunupudi wrote:
but how can it continue without press a Key :?:
SeekNext is performed when F3 key is pressed by the user.

this is for "new" Version or include in older Version 2022/07 also :?:

i do have a Buttonbar where i have F3
will it "override" F3 "internal" :?:

Re: XBROWSE Column Question

PostPosted: Wed May 10, 2023 7:45 pm
by nageswaragunupudi
SeekNext is implemented in FWH2304 which is triggered by F3.
It is not there in previous versions.

This is triggered when oBrw window receives WM_KEYDOWN message with F3 key.
(i.e., it is implemented in oBrw:KeyDown() method)