TppDbText.AutoSize problem !
Hi !
Delphi : 5 upd 1
ReportBuilder : 6.03
I have a TppDBText on my group header band, and the contains is changed on
every groups. I have a TppLine that I'm trying to set his width to fit with
the TppDBText, and it's never the true width. How to synchronize the line
???
Simple problem !
Tanx
Fred
Delphi : 5 upd 1
ReportBuilder : 6.03
I have a TppDBText on my group header band, and the contains is changed on
every groups. I have a TppLine that I'm trying to set his width to fit with
the TppDBText, and it's never the true width. How to synchronize the line
???
Simple problem !
Tanx
Fred
This discussion has been closed.
Comments
width property of the control. Since you should not rely on the width
property, you need to measure the text width in code using the current
device's canvas.
When you are printing to the printer, set the printer canvas font to be the
dbText font and then use the Printer.Canvas.TextWidth method. Use the
Report.Printer property to access the current printer when printing. When
you are printing, you can check to see if the printer device is non nil to
determine if you should use the screen canvas or printer canvas to measure
the text.
if (Report.PrinterDevice <> nil) then
use printer canvas
else
use screen canvas;
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com