Yeah, I saw that, but how do I get "item"?  That's what's throwing the error

tree.selectedItem = 0  - I get an error

Thoughts?


On 6/1/06, Tracy Spratt <[EMAIL PROTECTED]> wrote:

Use tree1.expandItem([item:Object],openorclose:Boolean).

 

item:Object would be the root node of the xml dataProvider.

 

Tracy

 


From: [email protected] [mailto:[email protected]] On Behalf Of John Grden
Sent: Thursday, June 01, 2006 2:42 PM
To: [email protected]
Subject: [flexcoders] Opening root node to show it's children just after loading data

 

This no longer works in beta3, any updates on how it's actually done?

 

Expanding a tree node

By default, the 

Tree
 control displays the root nodes of the 

tree
 when it first opens. If you want to expand a node of the 

tree
 when the 

tree
 opens, you can use the setIsOpen() method of the 

Tree
 control. The following example calls this method as part of the handler for the creationComplete
 event to expand the first root node of the 

tree
: <mx:Script>
    <![CDATA[
        function init

Tree
(){
            

tree
1.setIsOpen(

tree
1.getNodeDisplayedAt(0), true);
        }
        ]]>
    </mx:Script>

<mx:

Tree
 id="

tree
1" ... creationComplete="init

Tree
();" >
    ...
</mx:

Tree



--
John Grden - Blitz


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






--
John Grden - Blitz

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