Search code examples
apache-flextreeitemrendererdepth

How to use 2 different item renderers in mx:Tree


Question for Flex guys. How can I use multiple item renderers in mx:Tree depending on item's depth/level in tree? For example. For the first level items I want to use label with button and for second level items combobox.

Is this somehow possible?


Solution

  • Here is solution: In extended Tree just override function getItemRendererFactory(data:Object):IFactory and do neccessary logic to select proper itemRenderer.

    Hope this will help also someone else