Controlling the pen color of a region
I seem to be having trouble with controlling the line around a region.
If in Designer I choose NoLine, it displays on the preview screen OK but it
prints a very thin border line.
If in Designer I choose a white line, it prints OK but displays a fine white
line on the print preview.
I have tried changing the line color in RAP but ot only works when changing
from one color to another. If set to NoLine in the designer, my code is
ignored.
This implies that selecting NoLine does not change the pen color but instead
changes a different property...
Any suggestions?
If in Designer I choose NoLine, it displays on the preview screen OK but it
prints a very thin border line.
If in Designer I choose a white line, it prints OK but displays a fine white
line on the print preview.
I have tried changing the line color in RAP but ot only works when changing
from one color to another. If set to NoLine in the designer, my code is
ignored.
This implies that selecting NoLine does not change the pen color but instead
changes a different property...
Any suggestions?
This discussion has been closed.
Comments
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
I have chosen NoLine in the Designer.
I have added the line
Region1.Pen.Style := psClear
to both the ReportBeforePrint and ReportOnPrintDialogCreate events but
neither makes any difference on the printed output.
I have then chosen BrightGreen in the Designer.
I have added the line
Region1.Pen.Style := psClear
to both the ReportBeforePrint and ReportOnPrintDialogCreate events and the
print preview does NOT show the bright green line but STILL PRINTS a thin
black line on the printed output.
Have just found that I can overcome the problem if I disable Region1's
TRANSPARENT property on the ReportOnPrintDialogCreate event so I now have a
workaround, but were you aware of the 'problem'...
Regards,
Pete
zero and one. Chose NoLine in the toolbar, and set the pen style to
psClear. The region prints no line in the preview nor on the printer.
Email me a report template with a region that is configured which can't
print for you. Send it to support@digital-metaphors.com
From the help topic on Region.Pen:
For the region component, when the Pen.Width is set to zero, Pen.Width
behaves differently than in Delphi. The zero value is used as an indicator
for hairlines. If you want a shape or line to draw with the thinnest line
your printer is capable of, set Pen.Width to zero. In print preview, the
shape or line will look the same as a one-pixel width line, however, when
printed it will look thinner (how much thinner depends on the capabilities
of your printer.) This feature can be used to considerably improve the
appearance of reports where one-pixel width lines are looking too heavy.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com