6 Replies Latest reply on Apr 23, 2011 10:44 PM by Flex harUI

    TextFlow final size

    kleelof

      Hello,

       

        I am using the following code to fill a textflow and set it's container's size accordingly:

       

        textFlow = TextConverter.importToFlow (S, TextConverter .TEXT_FIELD_HTML_FORMAT);
                 
                  if (this.autosize )
                  {
                      this.width = measureHTMLText  (text).width;
                      this.height = measureHTMLText  (text).height ;
                  }

       

        This almost works. The size it comes up with is about 5 - 10% smaller than the actual size. How can I get the true size of the textflow object after adding text to it?

       

      take care,

      lee