Well, TextArea does not automatically resize to its content height.  I
think you will need to extend that component to do that.  I did
something like this for the Text component and will post the code below.
Warning, I have not used this in a year, and post it as an example only.
Also, since the resize happened in creationComplete, it will NOT work in
an item renderer or in a Repeater with recycleChildren="true".

 

Tracy

 

<?xml version="1.0" encoding="utf-8"?>

<mx:Text xmlns:mx="http://www.adobe.com/2006/mxml";

    creationComplete="initComponent()">

<mx:Script><![CDATA[

  

  private function initComponent():void

  {

    this.height = this.textHeight;

  }//

]]></mx:Script>

    

</mx:Text>

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of grimmwerks
Sent: Thursday, April 03, 2008 12:34 PM
To: [email protected]
Subject: [flexcoders] repeater with TextArea -- TextArea not sizing to
internal text?

 

I'm using a Repeater to loop through chunks of text and toss them in a 
VBox. Trouble is all the text boxes are the same = there doesn't seem 
to be a way to set a box to it's own internal text size? I'd like the 
boxes to be all different heights, just enough to view the text.

Help?

 

Reply via email to