Ok. I m writing my code below...all my text coming from tempXML Xml.and i m using repeater for loop.I want that my TextArea autosize according to text.I already used CSS and TextFormat but it not worked???
<?xml version="1.0"?> <!-- repeater\myComponents\CustButton.mxml --> <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="xmlload();" color="#008040"> <mx:Script> <![CDATA[ import mx.collections.ArrayCollection; import flash.text.TextField; import flash.net.URLRequest; import flash.net.*; import flash.xml.XMLDocument; import mx.controls.Alert; import flash.events.*; import mx.events.FlexEvent; public var ss:StyleSheet = new StyleSheet(); public var myText:String = ""; [Bindable] public var masterTaskListCollection:ArrayCollection = new ArrayCollection(); [Bindable] private var colorArray:ArrayCollection=new ArrayCollection([0xFFFFFF,0x00FF00]); public function xmlload():void{ var request:URLRequest = new URLRequest("myComponents/tempXML.xml"); var loader:URLLoader=new URLLoader(); try { loader.load(request); //Alert.show("hello"+loader.data); } catch (error:Error) { trace("Unable to load requested document."); } loader.addEventListener(Event.COMPLETE, FillArray); } private function FillArray(event:Event):void{ var xml:XML=new XML(event.target.data); var xmlnode:XMLDocument=new XMLDocument(); xmlnode.ignoreWhite = true; xmlnode.parseXML(xml.data); //Alert.show("xmlload()"[EMAIL PROTECTED]) var masterTaskList:Array = new Array(); var authors:XMLList=xml.heading; for(var i=0;i<authors.length();i++){ masterTaskList[i] = [EMAIL PROTECTED], [EMAIL PROTECTED]; masterTaskListCollection.source = masterTaskList; } } ]]> </mx:Script> <mx:Repeater dataProvider="{masterTaskListCollection}" id="outerLoop" > <mx:Repeater dataProvider="{outerLoop.currentItem}" id="innerLoop"> <mx:TextArea id="tempTxt" change="update()" width="100%" height="50%" wordWrap="true" color="{colorArray.getItemAt(innerLoop.currentIndex%2) as uint}" text="{innerLoop.currentItem}" buttonMode="true" fontSize="16" x="{(75*(innerLoop.currentIndex))}" y="{(75*(outerLoop.currentIndex))}" backgroundAlpha="0" borderThickness="0" toolTip="{(innerLoop.currentIndex%2) as uint}" horizontalScrollPolicy="off" verticalScrollPolicy="off"></mx:TextArea> </mx:Repeater> </mx:Repeater> </mx:VBox> Thanks, Regards Manesh Bahuguna On Oct 30, 11:36 am, "bhavya gowda" <[EMAIL PROTECTED]> wrote: > Hi..... > Plz elaborate your question....... > > Just have a look on this..(Am not sure about what you are asking..) > Dont mention width and height of your TextArea.. > > <?xml version="1.0" encoding="utf-8"?> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > layout="absolute"> > <mx:TextArea id="txt" editable="true"/> > </mx:Application> > > On Wed, Oct 29, 2008 at 2:30 PM, ManInAction <[EMAIL PROTECTED]>wrote: > > > > > > > Hi Friends, > > > I m using Repeater for TextArea in loop wise.So, i need tht My > > TextArea autosize according to text. > > > Thanks in advance.. > > > Regards, > > Manesh Bahuguna, > > Flash & Flex Programmer- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---

