FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse header
Posts: 332
Joined: Thu Nov 17, 2005 09:11 PM

xBrowse header

Posted: Wed Jul 14, 2010 03:22 PM

Hi friends,

oCol := oBrw:AddCol()
oCol:bStrData := { || Tran(ARQCHEQ->VALOR,"@e 99,999,999.99") }
oCol:cHeader := "VALOR"
oCol:nDataStrAlign := AL_RIGHT

How i can do "VALOR" header aligned right?

Regards,
Wanderson.

Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM

Re: xBrowse header

Posted: Wed Jul 14, 2010 03:27 PM

oCol:nHeadStrAlign := AL_RIGHT

Just a remark, try to use define or defefine xbrowse command, alignment will be done automatically

in your case

redefine xbrowse obrw id xxxx of yyy ;
fields ARQCHEQ->VALOR ;
pictures ,"@e 99,999,999.99")
....

Your header does not align right because you are adding an alpha column Tran(ARQCHEQ->VALOR,"@e 99,999,999.99")

writing the code diffrently allows not to care about this,

Hth

Richard

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 332
Joined: Thu Nov 17, 2005 09:11 PM

Re: xBrowse header

Posted: Wed Jul 14, 2010 04:28 PM

Thank you Richard, works great!

Wanderson.

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM

Re: xBrowse header

Posted: Wed Jul 14, 2010 11:36 PM
Code (fw): Select all Collapse
redefine xbrowse obrw id xxxx of yyy ;
fields ARQCHEQ->VALOR ;
pictures ,"@e 99,999,999.99")


If we are browsing ARQCHEQ, the following code is even better:
Code (fw): Select all Collapse
redefine xbrowse obrw id xxxx of yyy ;
COLUMNS "VALOR" ;
PICTURES "@e 99,999,999.99" ;
ALIAS 'ARQCHEQ'

In this case XBrowse knows more information about the field 'VALOR' in the DBF 'ARQCHEQ' and builds setget block. bonpostedit block, tries to see what order tag is to be selected for autosort and more.
This is the way to take the best out of XBrowse
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion