XBROWSE Column Question

User avatar
nageswaragunupudi
Posts: 10691
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: XBROWSE Column Question

Post by nageswaragunupudi »

how is the Syntax to use "Header - click" to SET Order / TAG :?:
Set

Code: Select all | Expand

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
User avatar
nageswaragunupudi
Posts: 10691
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: XBROWSE Column Question

Post 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

OrdWildSeek(oBrw:cSeek, oBrw:lSeekNext )
works for first seek and SeekNext automatically.

Note:Syntax

Code: Select all | Expand

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
User avatar
Marc Venken
Posts: 1481
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: XBROWSE Column Question

Post by Marc Venken »

Here is a sample for ordwildseek. It's new to me....

https://forums.fivetechsupport.com/view ... =3&t=39965
Marc Venken
Using: FWH 23.08 with Harbour
User avatar
nageswaragunupudi
Posts: 10691
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: XBROWSE Column Question

Post by nageswaragunupudi »

Marc Venken wrote:Here is a sample for ordwildseek. It's new to me....

https://forums.fivetechsupport.com/view ... =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
User avatar
Jimmy
Posts: 1733
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: XBROWSE Column Question

Post by Jimmy »

hi,
nageswaragunupudi wrote:

Code: Select all | Expand

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
User avatar
Jimmy
Posts: 1733
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: XBROWSE Column Question

Post by Jimmy »

hi,
nageswaragunupudi wrote:No need for 2nd call or loop.

Code: Select all | Expand

OrdWildSeek(oBrw:cSeek, oBrw:lSeekNext )
works for first seek and SeekNext automatically.

Note:Syntax

Code: Select all | Expand

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
User avatar
nageswaragunupudi
Posts: 10691
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: XBROWSE Column Question

Post by nageswaragunupudi »

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
User avatar
Jimmy
Posts: 1733
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: XBROWSE Column Question

Post 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" :?:
greeting,
Jimmy
User avatar
nageswaragunupudi
Posts: 10691
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: XBROWSE Column Question

Post 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)
Regards

G. N. Rao.
Hyderabad, India
Post Reply