views:

13

answers:

1

can i access every item renderer of tree in as3 ?( note that i am using custom item renderer) lets say i want to add some button in canvas(children of custom itemRender).. like

getItemRender().addChild();
+1  A: 

Not easily, but it is possible.

itemRenderers are stored internally in an array. USually that array is a protected variables. Take a look at listItems and freeItemRenderers and highlightItemRenderer.

They are all protected, so you'll have to extend the Tree class and expose them to access them.

If possible, I would strongly recommend putting values in your dataProvider and updating the itemRenderer based on that data; not trying to access itemRenderers directly.

www.Flextras.com
i solved the problem in other way around.. thanks for help.
Muhammad Husnain Ashfaq