Hi Sunil, this is what I'm trying to replicate in actionscript:
<mx:Canvasid="parentCanvas" width="100%" height="100%">    
<mx:Canvasid="childCanvas" width="{parentCanvas.width}" 
height="{parentCanvas.height-childText.height}"/></mx:Canvas>
In MXML this layout is DYNAMIC, meaning if I resize my window, all my 
components are also resized... 
 
How can I replicate this in actionscript?
 
Thank you.
 
-David




________________________________
From: sunild999999 <sunilbd...@gmail.com>
To: flexcoders@yahoogroups.com
Sent: Tuesday, February 17, 2009 3:55:39 AM
Subject: [flexcoders] Re: DYNAMIC actionscript child layout.


Um, I think you just need to think about this a little differently.

It's a percent value, so by definition it can only be 0-100.

If you want a child component to be half the width of it's parent container, 
then you set 
the child component's width to be 50%... just like you would do in HTML.

If that's not making sense, post some sample code and perhaps I or someone else 
can 
show you how to restructure it to use percent widths/heights.

Sunil

--- In flexcod...@yahoogro ups.com, - - <sailorsea21@ ...> wrote:
>
> Using the percentWidth and percentHeight, how can I use values other than 
> 0-100 ?
> Can I use the width of a component divided by two???
> "testlayout. width/2"
> How can I accomplish this?
> 
> Thanks.
> 
> -David


    <mx:Textid="childText" width="{parentCanvas.width}" bottom="0" 
text="test"/> 


      

Reply via email to