How can I, for example, in the following definition, incorporate the Color of a font (f.e. CLR_RED,...)
>DEFINE FONT oFont NAME 'ARIAL NARROW' SIZE 0,-9 OF oPrn
Thanks
José
print color fonts
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: print color fonts
unless you want to do this afterwards:
Emiliano Llano Díaz
Code: Select all
oReport:SAY(line, 5*nColumn,ALLTRIM(MyDB->MyField), oFont, ,CLR_HGREEN)
Re: print color fonts
Thank you Ellano, it works !!
Re: print color fonts
Dear Ellano,
With your solution I can print fonts in any color but once I utilize a color font (for example in a do while not eof() ) the rest of records are printed in this color even if I program a condition (if else endif) to print some records of the do while in black color ?
Can you explain me what to do?
Thanks
With your solution I can print fonts in any color but once I utilize a color font (for example in a do while not eof() ) the rest of records are printed in this color even if I program a condition (if else endif) to print some records of the do while in black color ?
Can you explain me what to do?
Thanks
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: print color fonts
Code: Select all
#include "fivewin.ch"
function Main()
local oPrn, oFont, nRow
local aColors := { CLR_HRED, CLR_GREEN, CLR_BLACK }
USE STATES
PRINT oPrn PREVIEW
DEFINE FONT oFont NAME "VERDANA" SIZE 0,-20 BOLD OF oPrn
PAGE
nRow := 2
do while RECNO() <= 20 .and. !eof()
@ nRow, 1 PRINT TO oPrn TEXT FIELD->NAME SIZE 5 INCHES ;
FONT oFont COLOR aColors[ ( RECNO() % 3 ) + 1 ] ;
LASTROW nRow
SKIP
enddo
ENDPAGE
ENDPRINT
RELEASE FONT oFont
CLOSE STATES
return nil
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: print color fonts
Thank you very much to all of you, problem solved !
Kind regards
José
Kind regards
José