I have built an array being displayed in an xbrowse. It lists accounts in numberic order (account numbers). I'd like to display the list in alpha order (account title). Element no 1 is "account no", element 2 is "title".
Thanks in advance.

#include "Fivewin.ch"
#include "xbrowse.ch"
function main()
local aBARSTYLE[11][2], oWnd, oBrw
aBARSTYLE[1] := { " 1", "Gradient" }
aBARSTYLE[2] := { " 2", "Brush" }
aBARSTYLE[3] := { " 3", "Image" }
aBARSTYLE[4] := { " 4", "Color" }
aBARSTYLE[5] := { " 5", "Office" }
aBARSTYLE[6] := { " 6", "Crystal" }
aBARSTYLE[7] := { " 7", "Office 3D" }
aBARSTYLE[8] := { " 8", "Crystal 3D" }
aBARSTYLE[9] := { " 9", "Bricks" }
aBARSTYLE[10] := { "10", "Tiled" }
aBARSTYLE[11] := { "11", "Borland" }
DEFINE WINDOW oWnd
oBrw := TXBrows():New( oWnd )
oBrw:SetArray( aBarStyle, .t., 2 )
oBrw:CreateFromCode()
oWnd:oClient := oBrw
ACTIVATE WINDOW oWnd
return nil
#include "Fivewin.ch"
#include "xbrowse.ch"
function main()
local aBARSTYLE[11][2], oWnd, oBrw
aBARSTYLE[1] := { " 1", "Gradient" }
aBARSTYLE[2] := { " 2", "Brush" }
aBARSTYLE[3] := { " 3", "Image" }
aBARSTYLE[4] := { " 4", "Color" }
aBARSTYLE[5] := { " 5", "Office" }
aBARSTYLE[6] := { " 6", "Crystal" }
aBARSTYLE[7] := { " 7", "Office 3D" }
aBARSTYLE[8] := { " 8", "Crystal 3D" }
aBARSTYLE[9] := { " 9", "Bricks" }
aBARSTYLE[10] := { "10", "Tiled" }
aBARSTYLE[11] := { "11", "Borland" }
DEFINE WINDOW oWnd
@ 0,0 XBROWSE oBrw OF oWnd AUTOCOLS AUTOSORT ARRAY aBarStyle LINES CELL
oBrw:CreateFromCode()
oWnd:oClient := oBrw
ACTIVATE WINDOW oWnd ON INIT ( oBrw:aCols[2]:SetOrder(), oBrw:Gotop() )
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 0 guests