Well, now I'm stymied.
With Flex 1.5, I was able to expand all the nodes of an mx:Tree with
something like:
function setOpenAll(aryNodes):Void{
var childNode = aryNodes.getTreeNodeAt(0);
var aryChildren = aryNodes.getChildNodes();
for (var i = 0;i < aryChildren.length;i = i + 1){
childNode = aryNodes.getTreeNodeAt(i);
treeElem.setIsOpen( myNode, true, false, false);
if ( childNode.hasChildNodes() ){
setOpenAll(childNode );
}
}
}
and invoke it with a button function like
click="setOpenAll(treeElem.dataProvider)"
But this throws an error in Flex 2. Near as I can tell... there's no
getTreeNodeAt() function anymore.
Anyone know how to go about expanding all the nodes of a tree, now, in
Flex 2? I'm continually surprised there are no methods
openAll()/closeAll() for the Tree. Seems like the new
expandChildrenOf() method would make things easier... but not quite
sure how to use it.
Thanks in advance,
-Carl
--
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/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> 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/