Board index » cppbuilder » Printer()->Canvas not updated when printer is changed

Printer()->Canvas not updated when printer is changed

I was trying to get the text height on the printer canvas to do a line
count and found that even if you change the printer with a PrinterDialog
or PrintSetupDialog, the values for TextHeight("X") do not reflect the
changed printer's pixels per inch.  After a BeginDoc(). the TextHeight
function does return the proper values.  Is this a VCL thing  or is this
the way Windows acts.  I tried a Refresh but that did not help.
Thank you for any suggestions,
Howard Helman
 

Re:Printer()->Canvas not updated when printer is changed


Quote
"Howard Helman" <h...@aaahawk.com> wrote in message

news:3EAD8CDA.9020708@aaahawk.com...

Quote
> I was trying to get the text height on the printer canvas to
> do a line count and found that even if you change the
> printer with a PrinterDialog or PrintSetupDialog, the values
> for TextHeight("X") do not reflect the changed printer's
> pixels per inch.  After a BeginDoc(). the TextHeight function
> does return the proper values.

The Printer Canvas is not updated with new font information until BeginDoc()
is called, that is why you see the new settings only take effect at that
time.

Gambit

Other Threads