Hello

i have sample code snippet for the  itemrenderer may help you

<?xml version="1.0" encoding="utf-8"?>
<mx:VBox height="100%" width="100%" xmlns:mx="http://www.adobe.com/
2006/mxml"
        creationComplete="onCreationComplete(event)">

        <mx:Script>

                <![CDATA[
                        import mx.events.FlexEvent;
                        import mx.controls.Text;

                        private function 
onCreationComplete(event:FlexEvent):void
                        {
                                if(data.value != null) // value is datafield 
from dataProvider
                    {
                                    var str : String = data.value;
                                    var arr : Array = str.split(",");
                            for(var i:int=0;i<arr.length;i++)
                                    {
                                                var text:Text = new Text();
                                                text.text = arr[i].toString();
                            this.addChild(text);
                        }
                    }
                        }

                ]]>

        </mx:Script>

</mx:VBox>


Thanks
v...@t Patel



On May 6, 6:00 pm, Karthik K <[email protected]> wrote:
> hi guys
>
> how to create text box in ActionScript in a for loop
> i need some 5 text box to be displayed, i am trying in datagrid itemrenderer
>
> override public function set data(value:Object):void
>                                     {
>                                         super.data=value;
>                                         var s_String:String=firstData.text;
>                                         var text1:Text=new Text();
>                                          var
> arr_Array:Array=s_String.split(",");
>
>                                           for(var
> i:int;i<arr_Array.length;i++)
>                                          {
>
> trace("arr_Array[i].toString()",arr_Array[i].toString());
>
> text1.text+=arr_Array[i].toString();
>
>                                          }
>                                         vBox.addChild(text1);
>
>                                     }
>
> i need all datas to be displayed in textbox and add to vbox
>
> please help
> --
> Karthik.k
> Mobile - +91-9894991640http://kkarthikresume.blogspot.com/
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to