This is actually how a lot of components work. What I've done is in createChildren I user super.addChild. I also override addChild, addChildAt, etc to pass it to the xxx container. Check out the Container source and you will see an example of how this works. Containers have a contentPane for the children, and then there are rawChildren which includes all the component parts.
Paul Claudia Barnal 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 > >
