1 Reply Latest reply on May 31, 2012 5:09 PM by Flex harUI

    measure mx:Text box height when text wrap

    Nirmalya Saha Level 1

      I have a textbox.

      private var myTextBox:Text = new Text();

       

      insert text from a array collection with a for loop

       

      for(var i:int=0;i<myArrCollection.length;i++){

           myTextBox.text = myArrCollection.getItemAt(i)["Name"].toString();

           myTextBox.width = 180;

      }

       

      How i measure the textbox height for every loop.

       

      I tried with myTextBox.measuredHeight, myTextBox.textHeight, myTextBox.height. Everything returns 0. . please help