this can be done. 

> at first I was thinking of keeping a register of what was opened so I
> knew what to close.

you dont have to. mx:tree has a property called openItems ..this has a 
reference to all the opened items. all you have to do is check whether 
anything is opened during a Tree.itemOpen event 
eg 
<mx:Tree id="tree1" itemOpen="treeOpened(event)">

public function treeOpened(event:TreeEvent):void
{
if(tree1.openItems.length > 1)
{
  tree1.expandItem(tree1.openItems[0], false);
}       

something like this

--- In flexcoders@yahoogroups.com, "barry.beattie" <[EMAIL PROTECTED]> 
wrote:
>
> no takers, Mick?
> 
> this was one thing I wanted to look into before being sidetracked 
with
> some datagrids.
> at first I was thinking of keeping a register of what was opened so I
> knew what to close.
> then I was thinking of closing all before opening the selected one.
> these are just some rough thoughts in absence of anything better.
> 
> it *must* be possible: the panels do it.
> 
> cheers
> barry.b
>







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

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

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