Color error in tPrinter.prg

Color error in tPrinter.prg

Postby TimStone » Thu Mar 21, 2019 6:28 pm

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
TimStone
 
Posts: 2927
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Color error in tPrinter.prg

Postby Otto » Thu Mar 21, 2019 11:16 pm

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
Otto
 
Posts: 6255
Joined: Fri Oct 07, 2005 7:07 pm

Re: Color error in tPrinter.prg

Postby TimStone » Fri Mar 22, 2019 5:54 pm

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
User avatar
TimStone
 
Posts: 2927
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA


Return to FiveWin for Harbour/xHarbour

Who is online

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