Like Flex, parents size their children.

Unlike Flex, because some changes to HTMLElements and CSS are "immediate" and 
not "deferred to a rendering phase", there is no central pump like the Flex 
LayoutManager that lays everything out.

Depending on the component set, the components "should" determine if they need 
sizing from their parent or are sizedToContent or are explicitly sized and 
don't have to wait for a parent.

If a component needs sizing from its parent (percent sizing, 
left/right/top/bottom, a more complex layout algorithm, etc), the component 
can't possibly know its size until parented.

The lifecycle in Royale "should be":
-construction
-set properties which might bring in beads
-user defined beads
-add to parent (and bring in default beads)

Many components dispatch an "initComplete" which means that it has been added 
to a parent and has its initial set of properties and beads.  In Basic 
components, the container layouts may run the first time on initComplete, 
although any size changes by parents or properties also currently trigger 
layout as does adding children to containers.

Hopefully, the answer to your question is somewhere in all of that.

HTH,
-Alex


On 12/11/19, 12:48 PM, "Carlos Rovira" <[email protected]> wrote:

    Hi,
    
    I'm having a hard time with sizes of components.
    When I create a component in the "strand" setter the width of that
    component reports 0 when debug.
    So doing a layout it does with width = 0.
    Then component has width = 100% via CSS what means that in real time has
    400px
    
    So my question is... Where is the first time when I get the width = 400px
    
    I need that 400px instead of the initial 0 (that is not real) in order to
    perform calculations.
    
    Thanks
    
    -- 
    Carlos Rovira
    
https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7Cc45149962f7b4ebf6a6808d77e7b7bd0%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637116941135308667&amp;sdata=Owogr%2BIIFa5B41rs%2BSwTAMIhx82bAZfaYq90Y6y%2BJiU%3D&amp;reserved=0
    

Reply via email to