Ah ok yeah ;) I'll try that - thanks Tracy
If you want to open the root tree node, use the root node of the dataProvider xml. Are you binding or using a result handler?
Tracy
From: [email protected] [mailto:[email protected]] On Behalf Of John Grden
Sent: Thursday, June 01, 2006 3:59 PM
To: [email protected]
Subject: Re: [flexcoders] Opening root node to show it's children just after loading data
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, theTreecontrol displays the root nodes of thetreewhen it first opens. If you want to expand a node of thetreewhen thetreeopens, you can use thesetIsOpen()method of theTreecontrol. The following example calls this method as part of the handler for thecreationCompleteevent to expand the first root node of thetree: <mx:Script>
<![CDATA[
function initTree(){
tree1.setIsOpen(tree1.getNodeDisplayedAt(0), true);
}
]]>
</mx:Script>
<mx:Treeid="tree1" ... creationComplete="initTree();" >
...
</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
YAHOO! GROUPS LINKS
- Visit your group " flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service .
--
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
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service .
--
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
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

