Hi, cant you just bind to that property? <mx:TextArea id="elementEdit" width="100%" height="{elementEdit.textHeight}"/>
________________________________ De: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Em nome de Gordon Franke Enviada em: quinta-feira, 10 de abril de 2008 11:01 Para: flexcoders@yahoogroups.com Assunto: Re: [flexcoders] Resizable TextArea i use this but the height is not 100% correct ;( <mx:TextArea id="elementEdit" width="100%" change="elementEdit.height = elementEdit.textHeight"/> Am Donnerstag, den 10.04.2008, 18:42 +0530 schrieb govind ram: > I want to expand TextArea components height when the text in the > TextArea is more than the default height. I already read about few > successions like below: > > <?xml version="1.0"?> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> "> > <mx:Script> > <![CDATA[ > import mx.events.FlexEvent; > > public function update():void > { > src.explicitHeight = src.textHeight + 10; > } > > ]]> > </mx:Script> > <mx:Panel title="TextArea Control Example" height="75%" > width="75%" paddingTop="10" paddingLeft="10"> > > <mx:TextArea id="src" text="Hello" change="update()"/> > > </mx:Panel> > </mx:Application> > > The above example increase the height of the TextAre a for ANY CHANGE > in the TextArea content. But I want to increase the height only when > height of the content increases the height of the TextArea. > > How to achieve this required. > Is there any way to count number of return character in the text? > > -Govind > > > __________________________________________________________ > Meet people who discuss and share your passions. Join them now. > > I want to expand TextArea components height when the text in the > TextArea is more than the default height. I already read about few > successions like below: > > <?xml version="1.0"?> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> "> > <mx:Script> > <![CDATA[ > import mx.events.FlexEvent; > > public function update():void > { > src.explicitHeight = src.textHeight + 10; > } > > ]]> > </mx:Script> > <mx:Panel title="TextArea Control Example" height="75%" > width="75%" paddingTop="10" paddingLeft="10"> > > <mx:TextArea id="src" text="Hello" change="update()"/> > > </mx:Panel> > </mx:Application> > > The above example increase the height of the TextAre a for ANY CHANGE > in the TextArea content. But I want to increase the height only when > height of the content increases the height of the TextArea. > > How to achieve this required. > Is there any way to count number of return character in the text? > > -Govind > > > > __________________________________________________________ > Meet people who discuss and share your passions. Join them now. > > >