First of all, when you add a component via MXML there is a lot more 
going on.  Check out the details on the liveDocs

http://livedocs.adobe.com/flex/3/html/
help.html?content=ascomponents_advanced_2.html#203434

Scroll down a bit and get to the "About the component instantiation 
life cycle" section.  It will explain what happens and you can see 
what to do about getting your styles right.

As for percents in the width and height parameters, there is actually 
a percentWidth and percentHeight parameter that you can use.  MXML 
just does this step automagically.

I hope this helps

--- In [email protected], "netdeep" <[EMAIL PROTECTED]> wrote:
>
> I would like to add a chart to a panel and have it inherit the same 
style as its parent. When I 
> do this with mx tags, everything works fine, but when I manually 
add it in actionscript with 
> addChild, it uses the default look and feel. Also how do you set 
the width of the chart to be 
> 100%. The width attribute is a number, not a percentage when you 
set it directly in 
> actionscript.
>


Reply via email to