Hi, That is tricky business.
Are you trying to make this component for mxml use? I have not had much luck with compositing like that. My suggestion is this; If you want to use mxml; Override createComponentsFromDescriptors() that gets called during createChildren(). Then remove those children and then add them to your container child. For outside api, create new methods like addCompositeChild() and have your users or you use that method which wraps a call to composite.addChild(). Do that for the methods you need. Honestly, I do not recommend overriding any IChildList methods of the Container. I have wasted much time with this. The reason why is that there is much more going on behind the scenes. Let me know if you have any more questions. Peace, Mike On 4/27/07, Claudia Barnal <[EMAIL PROTECTED]> wrote:
Hi, What would I have to do to make the child of a Panel be the recipient of any children added to that Panel, like below? For example, below if my custom container creates another container (let's call it the xxx container) in the createChildren() method, how can I make sure any children added to the parent container are added to the xxx container? I guess I have to override the actual addChild() method, to bypass the normal flow and adding the newly added children to the xxx container, but how would that work out? <blah:CustomContainer> <mx:HBox> </mx:HBox> <blah:CustomContainer> Any comments or ideas? Thanks, Claudia
-- Teoti Graphix http://www.teotigraphix.com Blog - Flex2Components http://www.flex2components.com You can find more by solving the problem then by 'asking the question'.
