FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Change the columns order with xBrowse
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Change the columns order with xBrowse
Posted: Wed Sep 05, 2007 07: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

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 167
Joined: Thu Mar 22, 2007 11:24 AM
Change the columns order with xBrowse
Posted: Wed Sep 05, 2007 08:16 AM

See

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

This error was reported with corection

No reaction

Frank

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Change the columns order with xBrowse
Posted: Wed Sep 05, 2007 09:40 AM

Frank,

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

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Change the columns order with xBrowse
Posted: Wed Sep 05, 2007 09: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

?

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 5
Joined: Fri Sep 07, 2007 02:47 PM
Change the columns order with xBrowse
Posted: Sat Sep 08, 2007 04: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

Continue the discussion