[flexcoders] How to get all itemrenderer instances of a tree?

2008-02-26 Thread xmwang1982
Hi experts,

I want to listen to the MouseDown event of some of the tree nodes. So
maybe I need to get their itemrenderer instances then add event
listeners to them. However, I have no idea to get a list of item
renderers... seems  no such a method exists.

Could you please give some hints?

Thanks a lot.



RE: [flexcoders] How to get all itemrenderer instances of a tree?

2008-02-26 Thread Alex Harui
Renderers are virtual  Only as many instances exist as you can see on
screen.  They are recycled and used to display other dataprovider items
as you scroll or expand/contract.  That's why there is no such method.
You can get to the on-screen renderers via indexToItemRenderer(), but
you'll be better off working from within the renderers do handle the
mouse.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of xmwang1982
Sent: Tuesday, February 26, 2008 6:24 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to get all itemrenderer instances of a tree?

 

Hi experts,

I want to listen to the MouseDown event of some of the tree nodes. So
maybe I need to get their itemrenderer instances then add event
listeners to them. However, I have no idea to get a list of item
renderers... seems no such a method exists.

Could you please give some hints?

Thanks a lot.