FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse autosort
Posts: 312
Joined: Sat Oct 08, 2005 09:12 AM
xBrowse autosort
Posted: Tue Jan 06, 2009 06:34 PM

Hi all,

i have a xBrowse with array as data source and in autosort mode.
When changing the sort order of the browse by clicking the col headers i would like to perform a 'go top'.

Is this possible? If yes, how?

Thanks for all hints.
Regards,
Detlef

Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Re: xBrowse autosort
Posted: Tue Jan 06, 2009 07:09 PM
By the method oCol:bRClickHeader, you can do it!

oCol := oBrw:oCol( cHeader )
oCol:bRClickHeader := {|| TEST->( dbGoTop() ) }
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 312
Joined: Sat Oct 08, 2005 09:12 AM
Re: xBrowse autosort
Posted: Tue Jan 06, 2009 09:26 PM
Julio,

thanks for your suggest.
It doesn't work, but you pointed me the way how to do it.

Sort oder is changed with a left click on the header.
And my data source is an array.
So i tried out the following which works as expected.
oBrw:aCols[ n ]:bLClickHeader := { || oBrw:GoTop() }


Thanks again Julio,
Detlef
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Re: xBrowse autosort
Posted: Tue Jan 06, 2009 09:35 PM
Detlef,

oBrw:aCols[ n ]:bLClickHeader 

is the same of  

oCol := oBrw:oCol( cHeader )
oCol:bLClickHeader


But your solution is wonderful! It's much more better!
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9

Continue the discussion