FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Listbox sort by column
Posts: 708
Joined: Fri Oct 28, 2005 09:53 AM
Listbox sort by column
Posted: Thu Sep 18, 2008 04:22 AM

Is it possible to click on a column header and sort by that column for listbox? Using the example below if user clicks on Reference, Our Reference or A/R Code, listbox will be sorted by that column value. I would appreciate any help with this. Thank You.

REDEFINE LISTBOX oTblBox FIELDS paytempt->ref , ;
paytempt->ourref , ;
paytempt->arcode ;
ID 6000 ;
HEADERS "Reference", "Our Reference", "A/R Code" ;
FIELDSIZES 175 , 125 , 75 ;
SELECT txno FOR cTxno ;
ON DBLCLICK RopPay( oFld, oTblBox, .F., cTxno, @nAmount, @nTxtype, @aGet ) ;
OF oFld:aDialogs[1] UPDATE

*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
Posts: 310
Joined: Mon Oct 10, 2005 05:10 AM
Listbox sort by column
Posted: Thu Sep 18, 2008 05:01 AM

Darrell

Have a look at oLbx:aActions := aTags

aTags := { {|| codeblock for first header },;
{|| codeblock for second header}}

Hope this helps

Colin

Posts: 708
Joined: Fri Oct 28, 2005 09:53 AM
Listbox sort by column
Posted: Thu Sep 18, 2008 12:43 PM

Hi Colin, thank you very much!!! That worked!

*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com

Continue the discussion