You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Deepak MS <me...@gmail.com> on 2013/12/18 13:59:38 UTC

Flex 3 Tree - Customised icons

Hello,
I'm working on one of the flex 3 application currently. And I have a tree
in it. It shows default folder icon(both expand and collapse icons are
shown properly). Now I need to add a iconFunction to customise the folder
icons based on data. But in iconFunction I can return only one icon. I want
to return 2 icons, one for expand state and another one for collapsed
state.

I can use folderOpenIcon and folderClosedIcon on the tree directly, but
here I cannot assign the icons based on data. I can do it only in
iconFunction.

Is there a way we can achieve this?

Re: Flex 3 Tree - Customised icons

Posted by Alex Harui <ah...@adobe.com>.
Yes, you'll just have to do more customization and override more of the
renderer.  It might be faster to make a copy of TreeItemRenderer and
modify that.

On 12/18/13 4:59 AM, "Deepak MS" <me...@gmail.com> wrote:

>Hello,
>I'm working on one of the flex 3 application currently. And I have a tree
>in it. It shows default folder icon(both expand and collapse icons are
>shown properly). Now I need to add a iconFunction to customise the folder
>icons based on data. But in iconFunction I can return only one icon. I
>want
>to return 2 icons, one for expand state and another one for collapsed
>state.
>
>I can use folderOpenIcon and folderClosedIcon on the tree directly, but
>here I cannot assign the icons based on data. I can do it only in
>iconFunction.
>
>Is there a way we can achieve this?