Color error in tPrinter.prg

Post Reply
User avatar
TimStone
Posts: 2955
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Has thanked: 25 times
Been thanked: 2 times
Contact:

Color error in tPrinter.prg

Post by TimStone »

If you use SAY( x,y, oText, oFont, nWidth, nClrText ) in tPrinter, and specify a nClrText, it should be used only for that oText specified, and return to default.

Instead, any further calls where nClrText is not specified will print in the nClrText from that line.

Example:

SAY( x, y, "Hello" ). // prints in the default
SAY( x, y, "Highlight",,,CLR_BLUE ). // prints in blue
SAY( x,y, "Oops" ). // prints in blue rather than the default
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
Otto
Posts: 6410
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 26 times
Been thanked: 2 times
Contact:

Re: Color error in tPrinter.prg

Post by Otto »

Hello Tim,
try Fivewin’s EasyReport.
Best regards
Otto

Image

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
TimStone
Posts: 2955
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Has thanked: 25 times
Been thanked: 2 times
Contact:

Re: Color error in tPrinter.prg

Post by TimStone »

Otto,

All of my work is done with tPrinter. I have a lot of reports and want to bring color to them. I started with an Invoice ( very complex ) and it is working fine ( except the background colors ).

I brought this up because I believe it is a bug in the tPrinter class. I can do the fix, but it should be done in the distribution libraries or I will have to fix every release.

For the Say( ), if the value passed is ! NIL, the current color should be saved, and after execution of the print line, it should be restored.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Post Reply