public function expandTree():void

{

treeTest.selectedIndex = 0;

treeTest.expandChildrenOf(treeTest.selectedItem , true);

}

 

Remember to call this function after a validateNow(), so in my case it’s:

 

treeTest.dataProvider = treeData;

treeTest.validateNow();

                                                                       

expandTree();

 

Hope this works for you,

Jonas

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Sascha
Sent: woensdag 27 september 2006 14:03
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Auto-expand Treenodes

 

I know this had been brought up before and I found some stuff on it in the
archive but it doesn't work for me... I want to auto-expand a Tree when it
is displayed ...

objectTree.expandChildrenOf(objectTree.dataProvider[0], true);

gives me a "Cannot access a property or method of a null object reference."

myTree.selectedItem = myTree.dataProvider.getItemAt(0); //Mailbox node
myTree.expandChildrenOf(myTree.selectedItem, true);

also doesn't work.

objectTree.selectedIndex = 0;
objectTree.expandChildrenOf(objectTree.selectedItem, true);

Selects the first item but doesn't expand it.

What can I do to expand the tree? Any info on this would be appreciated!

Sascha


__________ NOD32 1.1776 (20060926) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com

__._,_.___

--
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
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to