Font size
Hi!
Is there a better way to set the font size then using a series of if
statements (like in post "Font vs. font.size" posted by Mr. Beck) ? I was
thinking o using a while loop like so:
while label1.width > maxlength do
label1.font.size := label1.font.size - 1;
I hoped that when I decrease the font size the width of the label would be
recalculated, but it seems this is not the case.
Is there a better way to set the font size then using a series of if
statements (like in post "Font vs. font.size" posted by Mr. Beck) ? I was
thinking o using a while loop like so:
while label1.width > maxlength do
label1.font.size := label1.font.size - 1;
I hoped that when I decrease the font size the width of the label would be
recalculated, but it seems this is not the case.
This discussion has been closed.
Comments
did you have set the autosize option of your label?
--
best regards
chris (EULANDA)
www.eulanda.com
ERP SOLUTIONS
Which event are you altering the size of the label? This will need to be
done before the component has generated to see the results. Also if you are
loading templates, you need to be sure the autosize property fo the label is
saved down with the template or it will not be honored when loaded.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
none work
In which should the font size be changed
I'm not using templates
Regards
Take a look at the following example of resizing the font based on the space
available.
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