Maybe this one could help:

http://blog.benstucki.net/?p=42


2007/9/7, Alex Harui <[EMAIL PROTECTED]>:
>
>    TreeItemRenderer assumes the images are embedded.  You could write your
> own subclass that handles external icons.
>
>  ------------------------------
> *From:* [email protected] [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Gordon Smith
> *Sent:* Friday, September 07, 2007 1:30 PM
> *To:* [email protected]
> *Subject:* RE: [flexcoders] How to create dynamically Icon for a Tree
>
>   The icon must be embedded in the application. However, you can have
> multiple icons embedded and choose one of them based on runtime data from
> the server.
>
> - Gordon
>
>  ------------------------------
> *From:* [email protected] [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Claude Hussenet
> *Sent:* Friday, September 07, 2007 1:25 PM
> *To:* [email protected]
> *Subject:* [flexcoders] How to create dynamically Icon for a Tree
>
>
> I would like to be able to create the icon for folders or leefs
> at runtime based on some information that I am getting from the
> server.
> I can not figure out a way to use the iconFunction available on the
> Tree class for this purpose.
>
> Please let me know if it's possible.
>
> Thx-Claude
>
> public function myIconFunction(item:Object):Class {
>
> var pathIcon:String= item.pathIcon;
> var iconClass:Class =??????????? (pathIcon) ?????????
>
> return iconClass;
>
> }
>
> <mx:Tree id="myTree" iconFunction="myIconFunction" >
>
>   
>



-- 
::| Carlos Rovira
::| http://www.carlosrovira.com
::| http://www.madeinflex.com

Reply via email to