#Include "Fivewin.ch"
FUNCTION PrnBox()
LOCAL oPrn, oFont, oBrush, ctitulo9, oPen
ctitulo9 := "Gancedo && Asociados S.R.L."
DEFINE BRUSH oBrush FILE "c:\fwh1905\bitmaps\backgrnd\pebbles.bmp"
PRINT oPrn FILE "DARIOF.pdf"
DEFINE FONT oFont NAME "VERDANA" SIZE 0, -12 OF oPrn BOLD
DEFINE PEN oPen WIDTH 2 OF oPrn
PAGE
oPrn:RoundBox( 1, 1, 5, 5, .5, .5, { CLR_HRED, 3 }, oBrush, ;
{ "FIRST" + CRLF + "SECOND", oFont, CLR_WHITE, "B" }, ;
"INCHES" )
oPrn:RoundBox( 1, 7.8, 1.8 , 15.50, 0.5,0.5, oPen, { CLR_WHITE, 3 }, ;
{ cTitulo9, oFont, CLR_BLACK }, "CM" )
ENDPAGE
ENDPRINT
RELEASE FONT oFont
RELEASE BRUSH oBrush
IF FILE( "DARIOF.PDF" )
MsgInfo( "DARIOF.PDF Generado.", "DARIOF.PDF Generado" )
ENDIF
RETURN NIL
/*
[url]
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=39498
[/url]
*/
/*
Silvio.Falconi escribió:
METHOD Box( nTop, nLeft, nBottom, nRight, ;
[Pen], ; // oPen/hPen/nColor/{nColor,nThickness}
[Brush], ; // nColor / oBrush
[aText], ; // { cText, oFont, nColor } Painted in center
cUnits ; // "CM", "MM", "INCHES"
)
I tried to use aText array but I can set only { cText, oFont, nColor } and it was printed in center
How I can to print it with align ?
Now, aText can be { cText, oFont, nTxtColor, cAlign }
cAlign:
"TL" : TopLeft
"TR" : TopRight
"T" : Top Center
"BL" : Bottom Left
"BR" : Bottom Right
"B" : Bottom Center
"L" : Left Vert Center
"R" : Right Vert Center
But you can use this for only String, though this string can be multi-line delimited by CRLF.
If you want to print 2 or more strings with different alignments, you need to write your own code for that
*/
Regards, saludos.