A Tree consists of TreeRows and cell renderers.  The TreeRow places 
the open/close icon and the icon for the row and then its 
cellRenderer.  If a Checkbox is the cell renderer then you'll get see 
the open/close then the folder/leaf icon then the checkbox then the 
checkbox label.

Have you considered just replacing the folder/leaf icon with a 
checkbox icon and writing code to handle it being clicked?

When a checkbox is clicked you are responsible for setting properties 
on all the child nodes so they know whether to display the checked or 
unchecked version.  Use an iconFunction to calculate which icon to 
use.

--- In [email protected], "Tom Jeffery" <[EMAIL PROTECTED]> 
wrote:
> I just started looking at doing something similar.  I believe you're
> going to want to extend TreeRow.  There's an example online here:
> 
http://www.macromedia.com/support/documentation/en/flex/1/cellrenderer
s/cellrenderers13.html
> 
> The example is not perfect, and I've been really struggling to
> implement the behaviors you described.  Simply getting the checkbox 
to
> display properly with the disclosure button and icons has already
> sidelined me.  Regardless of the _x coordinate I set for the 
checkbox,
> it seems to want to render itself right on top of the disclosure
> button which has been very frustratng.  I'd love to hear from anyone
> who's tackled this already.
> 
> Thanks!
> Tom Jeffery
> 
> --- In [email protected], "loveewind" <[EMAIL PROTECTED]> 
wrote:
> > 1.as referred in Developing Flex Applications document
> > 
> > "display custom cell content for each of Tree's rows,
> > This customized cell can contain a prebuilt component, such as a 
> > CheckBox control, or any user interface component that you 
create."
> > 
> > 
> > and I want to add CheckBox behind each Node and branch,
> > also if check the checkBox, the checkBox can be listened,
> > 
> > for example, if the node's checkBox is checked, this node's all 
> > branch's checkBox will be checked.
> > 
> > who has this experience? I am glad to get your help!
> > 
> > thanks!




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to