Implementation;
tree.expandChildrenOf(tree.selectedItem, true);
The first param is whatever node you want all the children opened or closed of.
Peace, Mike
I swear I just did this and yes, it is this easy..
public function expandChildrenOf(item:Object, open: Boolean):void
Peace, Mike
On 6/15/06, wayneposner < [EMAIL PROTECTED]> wrote:Howdy all!
I've been searching and searching and trying to figure out how to
convert the code floating around out there that fully
expands/collapses a tree. Can someone give me a hand with this.
I've got the following:
function expandTree(t:mx.controls.Tree) : Void {
var i:Number=0;
var node:mx.controls.treeclasses.TreeNode=t.getTreeNodeAt(i);
while (node != undefined){
if (t.getIsBranch(node) && ! t.getIsOpen(node)){
t.setIsOpen(node,true);
}
i++;
node=t.getNodeDisplayedAt(i);
}
}
but i've been unsuccessful in finding the appropriate classes for
getTreeNodeAt and TreeNode. I read somewhere to use
ITreeDataDescriptor but it does not work with DisplayObjects
(getChildAt). Someone please help! :)
Thanks!
--
What goes up, does come down.
--
What goes up, does come down. __._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
![]()
SPONSORED LINKS
Web site design development Computer software development Software design and development Macromedia flex Software development best practice
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___
- [flexcoders] Fully Expand Tree in Flex Beta 3 wayneposner
- Re: [flexcoders] Fully Expand Tree in Flex Beta 3 Michael Schmalle
- Re: [flexcoders] Fully Expand Tree in Flex Beta ... Michael Schmalle
- [flexcoders] Re: Fully Expand Tree in Flex B... wayneposner
Reply via email to

