Hi everyone, well I am still having problems with resizing a Text Area. 
At the moment I am using this code:

package mylib
{
    import mx.controls.TextArea;
    import flash.text.TextField;
    import mx.controls.Alert;
    public class AdvancedTextArea extends TextArea
    {
        public function AdvancedTextArea() {
            super();
            this.editable=false;
            this.selectable=false;
            this.verticalScrollPolicy="off";
            this.horizontalScrollPolicy="off";

        }

        override protected function measure():void
        {
            super.measure();
            var myTF:TextField=new TextField();
            var altoxLineas:Number=new Number();
            myTF.wordWrap=true;
            myTF.text=text;
            myTF.width=explicitWidth-10;
                        altoxLineas=myTF.numLines*3.9+altoxLineas/3.9;
                     measuredHeight = measuredMinHeight = 
myTF.textHeight + 10;
                        if (altoxLineas>myTF.textHeight) measuredHeight 
= measuredMinHeight = altoxLineas + 10;
        }
    }
}

Although it does grows my Textarea, in some cases it doesn't grow it 
enough... Any pointers would be appreciated.

Reply via email to