5 Replies Latest reply on Feb 11, 2011 12:47 PM by jimmyoneshot

    Best Way To AutoResize Font of Text/Label etc upon container resize?

    jimmyoneshot Level 1

      I've looked around but I can't really find any suitable code for this.

       

      What is the best way to resize the font of a text/label field to fit within it's container upon the resizing of the container? i.e. a container is made smaller and if the font size is too big that it makes the text field too big for it's container it resizes until it fits.

       

      Here's the code I have in place now:-

       

      <mx:Canvas width="100%" height="100%" resize="">
      
      
      <mx:Text id="mytext" width="100%" height="100%" text="{data.label}"/>                                  
      
      
      </mx:Canvas>