How can I set a TppLabel's Font.Height at runtime in inches?
(I want to set the font height so that is is the same height as it's label, which is calculated at runtime... But TFont.Height is in pixels, and TppLabel.Height is in inches.)
I believe you can use the TFont.PixelsPerInch to find your screen setting, then using this number (most likely 96 ppi) to convert the TppLabel.Height to Screen Pixels.
Comments
Font.Height := Trunc(Font.PixelsPerInch * NewHeightInInches);
Bill.
I believe you can use the TFont.PixelsPerInch to find your screen setting,
then using this number (most likely 96 ppi) to convert the TppLabel.Height
to Screen Pixels.
liPixelsPerInch := TFont.PixelsPerInch;
lFont.Height := Trunc(ppLabel1.Height * liPixelsPerInch);
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com