hi all

I just need a quick help with how to pick up if a tree is expanded or
not. I've almost got it - it'll expand all but not collapse.

I don't think "myTree.openItems != null" is correct but I can't think
of what else....


            private function toggleExpandCollapseTree():void
        {
                myTree.selectedIndex = 0;
                if (myTree.openItems != null){
                        myTree.expandChildrenOf(myTree.selectedItem , true);
                        btnExpandCollapseTree.label = "Collapse All";
                }else{
                        myTree.expandChildrenOf(myTree.selectedItem , false);
                        btnExpandCollapseTree.label = "Expand All";
                }
        }


any suggestions? thanx.

PS: I have to cater for cases where only a root node exists


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