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. __._,_.___

--
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




__,_._,___

Reply via email to