POC

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute">
    <mx:VBox id="main" x="10" y="10" width="100%" height="100%"
borderStyle="solid" borderColor="#EF2B0A" borderThickness="5">

        <mx:Tile id="t" height="100%" width="100%"
creationComplete="adddata()"  borderStyle="solid" borderColor="#B7BCB7"
borderThickness="6">
        </mx:Tile>
    <mx:Button label="scale" click="scale()" />
        <mx:Button label="normal" click="back()"/>
    </mx:VBox>
    <mx:Script>
        <![CDATA[
            import mx.controls.Label;
            private function adddata():void
            {
                for (var i:Number=0;i<50;i++)
                {
                    var l:Label=new Label();
                    l.text="Label"+i;
                    t.addChild(l);
                }
            }
            private function scale():void
            {
                t.scaleX=2;
                t.scaleY=2;
            }
            private function back():void
            {
                t.scaleX=1;
                t.scaleY=1;
            }
        ]]>
    </mx:Script>
</mx:Application>


On Thu, Feb 12, 2009 at 11:11 AM, HISSAM <[email protected]> wrote:

> also if u scale the container n if the children donot have explicit height
> n width then the children are automatically scaled
>
>
> On Thu, Feb 12, 2009 at 10:46 AM, v...@t <[email protected]> wrote:
>
>>
>> Hello,
>>
>> To resize the children automatically give their height and width in
>> precentage.
>>
>> like this
>>
>> child.percentWidth = 100;
>> child.percentHeight = 70;
>>
>> so when parent get resize child control get automatically resize as
>> per parent heigh/width.
>>
>> Thanks
>> Virat Patel
>>
>> On Feb 11, 3:13 pm, akshay gore <[email protected]> wrote:
>> > Hi all,
>> >          I want to resize the children of the boxes dynamically.. n in
>> > this i am adding child to boxes at run time..
>> > Can you tell me pls.. that how can i do this .. Is there any property
>> > of box thr which i could automatically resize its children ..
>> > Thanks in advance
>> > Regards,
>> > Akshay
>> >>
>>
>
>
> --
> -----------------------------
> Regards,
>  HISSAM,
> ------------------------------
>



-- 
-----------------------------
Regards,
 HISSAM,
------------------------------

--~--~---------~--~----~------------~-------~--~----~
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