xBrowse header

xBrowse header

Postby Wanderson » Wed Jul 14, 2010 3: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.
Wanderson
 
Posts: 332
Joined: Thu Nov 17, 2005 9:11 pm

Re: xBrowse header

Postby Richard Chidiak » Wed Jul 14, 2010 3: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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: xBrowse header

Postby Wanderson » Wed Jul 14, 2010 4:28 pm

Thank you Richard, works great!

Wanderson.
Wanderson
 
Posts: 332
Joined: Thu Nov 17, 2005 9:11 pm

Re: xBrowse header

Postby nageswaragunupudi » Wed Jul 14, 2010 11:36 pm

Code: Select all  Expand view
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: Select all  Expand view
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
User avatar
nageswaragunupudi
 
Posts: 10628
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 74 guests