FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour XBROWSE Column Question
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: XBROWSE Column Question
Posted: Wed May 10, 2023 12:28 AM
how is the Syntax to use "Header - click" to SET Order / TAG :?:
Set
Code (fw): Select all Collapse
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.
Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: XBROWSE Column Question
Posted: Wed May 10, 2023 12:42 AM
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 (fw): Select all Collapse
OrdWildSeek(oBrw:cSeek, oBrw:lSeekNext )
works for first seek and SeekNext automatically.

Note:Syntax
Code (fw): Select all Collapse
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.
Regards



G. N. Rao.

Hyderabad, India
Posts: 1487
Joined: Tue Jun 14, 2016 07:51 AM
Re: XBROWSE Column Question
Posted: Wed May 10, 2023 07:20 AM
Here is a sample for ordwildseek. It's new to me....

https://forums.fivetechsupport.com/viewtopic.php?f=3&t=39965
Marc Venken

Using: FWH 23.08 with Harbour
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: XBROWSE Column Question
Posted: Wed May 10, 2023 07:50 AM
Marc Venken wrote:Here is a sample for ordwildseek. It's new to me....

https://forums.fivetechsupport.com/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
Regards



G. N. Rao.

Hyderabad, India
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: XBROWSE Column Question
Posted: Wed May 10, 2023 06:24 PM
hi,
nageswaragunupudi wrote:
Code (fw): Select all Collapse
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
greeting,

Jimmy
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: XBROWSE Column Question
Posted: Wed May 10, 2023 06:29 PM
hi,
nageswaragunupudi wrote:No need for 2nd call or loop.
Code (fw): Select all Collapse
OrdWildSeek(oBrw:cSeek, oBrw:lSeekNext )
works for first seek and SeekNext automatically.

Note:Syntax
Code (fw): Select all Collapse
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
greeting,

Jimmy
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: XBROWSE Column Question
Posted: Wed May 10, 2023 07:01 PM
but how can it continue without press a Key :?:
SeekNext is performed when F3 key is pressed by the user.
Regards



G. N. Rao.

Hyderabad, India
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: XBROWSE Column Question
Posted: Wed May 10, 2023 07:22 PM
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" :?:
greeting,

Jimmy
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: XBROWSE Column Question
Posted: Wed May 10, 2023 07:45 PM

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)

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion