resize font to fit into label
Good afternoon.
i have a report that has a label and is assigned a default font size of 36
and a max data area of 14.
now depending on what the person types causes the text to truncate even
though its 14 chars. what i would like to do is start with a font size of 36
and if the text exceeds the printable area for that label then reduce the
font size automatically to fit within the boundaries.. is this possible??
thanks in advance.
i have a report that has a label and is assigned a default font size of 36
and a max data area of 14.
now depending on what the person types causes the text to truncate even
though its 14 chars. what i would like to do is start with a font size of 36
and if the text exceeds the printable area for that label then reduce the
font size automatically to fit within the boundaries.. is this possible??
thanks in advance.
This discussion has been closed.
Comments
Take a look at the following example of measuring the text before it is
printed using the TCanvas.TextWidth routine then shrinking the font if
needed.
http://www.digital-metaphors.com/tips/AutoFontSize.zip
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com