I've been struggling trying to figure out how to get Tree.expandItem()
to work.

For example, I have this mxml:
    <mx:Tree id="tree1" showRoot="true" width="180" height="100%"
        verticalScrollPolicy="off">
                        
        <mx:dataProvider>
            <mx:XML format="e4x">
                <node label="Configuration" id="conf"
creationComplete="tree1.expandItem(conf, true);">
                    <node label="Main Config"/>
                    <node label="Helper Apps"/>
                </node>
            </mx:XML>
        </mx:dataProvider>
    </mx:Tree>

The intention is to have the "Configuration" node opened when the tree
is displayed.  But the tree displays with that node closed.



--- In flexcoders@yahoogroups.com, "Deepa Subramaniam" <[EMAIL PROTECTED]>
wrote:
>
> You now want to use Tree.expandItem() to open or close a branch node. 
> 
>  
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Mike Wertheim
> Sent: Tuesday, June 27, 2006 1:02 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] expanding Tree Nodes
> 
>  
> 
> According to
> http://livedocs.macromedia.com/labs/1/flex20beta3/wwhelp/wwhimpl/common/
> html/wwhelp.htm?context=LiveDocs_Parts&file=00000611.html , the
> following code used to work in Flex Beta 2 but stopped working in Beta
> 3.  :
> 
> <![CDATA[
> 
>     function initTree(){
> 
>         tree1.setIsOpen(tree1.getNodeDisplayedAt(0), true);
> 
>     }
> 
>     ]]>
> 
> </mx:Script>
> 
> 
> 
> <mx:Tree id="tree1" ... creationComplete="initTree();" >
> 
> 
>     ...
> 
> </mx:Tree>
> 
> 
> What is the correct way to do this in the latest version?
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

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