Change the columns order with xBrowse

Change the columns order with xBrowse

Postby Marco Turco » Wed Sep 05, 2007 7:54 am

Hi,
I succesfully replaced the fwh tcbrowse with xbrowse that is more flexible.

I only have the problem to change the order of colums,
for example with an array like:

{"Mark","11-11-2007","3:45"}
{"Luc","4-5-2004","11:37"}

if I want to display the second,third and first element in twbrowse I can do it with

ADD COLUMN TO oBrw DATA ARRAY ELEM 2
ADD COLUMN TO oBrw DATA ARRAY ELEM 3
ADD COLUMN TO oBrw DATA ARRAY ELEM 1

but how can I do the same with xBrowse ?

Thanks in advance.

Best Regards,

Marco Turco
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Postby demont frank » Wed Sep 05, 2007 8:16 am

See

http://fivetechsoft.com/forums/viewtopi ... ht=xbrowse

This error was reported with corection

No reaction

Frank
demont frank
 
Posts: 167
Joined: Thu Mar 22, 2007 11:24 am

Postby Antonio Linares » Wed Sep 05, 2007 9:40 am

Frank,

Already implemented. We simply missed it. Thanks! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41434
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Marco Turco » Wed Sep 05, 2007 9:54 am

Yes,
but what is the way to display the columns with the order

ELEM 2
ELEM 3
ELEM 1

instead the default
ELEM 1
ELEM 2
ELEM 3

?
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Postby Demont.frank » Sat Sep 08, 2007 4:08 pm

Otto

ELEM 2
ELEM 3
ELEM 1

instead the default
ELEM 1
ELEM 2
ELEM 3

WITH OBJECT oBrw
:Swapcols(:aCols[1],:aCols[2]) ; :Swapcols[:aCols[2],:aCols[3])
END

Or look at oBrw:setarray to see how oBrw:bstrdata is set

oCol := :aCols[1]
oCol:bStrData := GenArrayBlock( { || :aArrayData[ :nArrayAt ] },2, .t. )

oCol := :aCols[2]
oCol:bStrData := GenArrayBlock( { || :aArrayData[ :nArrayAt ] },3, .t. )

oCol := :aCols[3]
oCol:bStrData := GenArrayBlock( { || :aArrayData[ :nArrayAt ] },1, .t. )

GenArrayBlock is STATIC and must be changed or copied
Demont.frank
 
Posts: 5
Joined: Fri Sep 07, 2007 2:47 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], Horizon, sysctrl2 and 36 guests