Make Tree Nodes expand when node is clicked ???

Specific component issue related to using them in 2004? Discuss here.
Post Reply
wyrm
Posts: 6
Joined: Mon Jun 30, 2003 5:56 pm

Make Tree Nodes expand when node is clicked ???

Post by wyrm » Fri Jan 07, 2005 8:37 pm

Hi,

I'm using a Tree component (?!).

When you click on the disclosureClosedIcon (normally a horizontal arrow), the node expands to show it's children. How would I make the node expand when any part of that row(node) is clicked - not just the arrow.

Thanks,

wyrm
Posts: 6
Joined: Mon Jun 30, 2003 5:56 pm

Re: Make Tree Nodes expand when node is clicked ???

Post by wyrm » Sat Jan 08, 2005 7:58 am

OK I managed to work out!

Code: Select all

treeListener.change = function(evt:Object)
{
   var node = evt.target.selectedItem;
   
   // If this is a branch, expand/collapse it
   if (_root.catTree.getIsBranch(node))
   {
       _root.catTree.setIsOpen(node, !evt.target.getIsOpen(node), true);
   }
}

catTree.addEventListener("change", treeListener);



Where catTree is the instance name of my Tree component.

Does anyone know how to use this crazy program?! It's like super-advanced aliens landed on Earth, created Flash, and then disappeared to another universe... :roll:

Jason3d
Posts: 52
Joined: Mon Jun 30, 2003 5:56 pm

Re: Make Tree Nodes expand when node is clicked ???

Post by Jason3d » Sat Jan 08, 2005 7:19 pm

And then the aliens merged with Adobe.

sneakersupplier
Posts: 94
Joined: Fri Sep 18, 2009 4:53 am
Contact:

Everything has to be read out loud until it sounds right

Post by sneakersupplier » Fri Sep 10, 2010 2:10 am

That is the secret, you know. Everything has to be read out loud until it sounds right.

----------------
<a href="http://www.salelvbags.com">Louis Vuitton Handbags</a>

Post Reply