Do you mean defining a subclass of TreeItemRenderer and calling addChild() in 
its 
constructor? Then it seems not easy to position and resize the embeded controls 
intuitively. 
What's worse, this subclass is of course hard to reuse. 

And I just gave a simplified case. What if I want a super tree item renderer 
consisting of a 
ItemRendererA, a ItemRendererB, a ControlA, a ControlB, a ControlC ... ? Don't 
you think it is 
much more convenient and elegant to combine all these controls and standard 
item 
renderers in one container using mxml than to write a item renderer subclass in 
AS and fill it 
with all these stuffs as if it is a container?  (You should notice I have no 
hard logic to code 
here, but just a little layout composition to build and data bindings to make.)

Now that we have mxml as a nice layout framework, why don't we make it better 
and let 
developers combine all the available elements on it to build whatever they can 
imagine at 
will?
--- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Why composite?  Just add the label when you subclass.


Reply via email to