Hi,

I had this problem also, it seems that if you use the databinding
functionality, then you will have to detect when the tree is fully
loaded before setting a node to open. 

I did a sort of hack to achieve this.  I used the following to listen
to the tree's list items update complete. ( This will fire for each
item in your tree so you will have to put some logic to handle this
behavior in your treeDataChangedHandler code ) note: it will also fire
each time you expand the tree and more nodes are made visible.

tree.addEventListener(FlexEvent.UPDATE_COMPLETE, treeDataChangedHandler);

In my treeDataChangedHandler function, I am expanding the tree and
selecting the first node.

private function treeDataChangedHandler(event:Event):void
{         
   tree.expandChildrenOf(tree.firstVisibleItem,true);
   tree.selectedItem = tree.firstVisibleItem;
}

I know that this is a bit of a hack and My wish is for this
functionality to be part of the built-in functionality for controls.

Cheers,

Tim



--- In [email protected], Flapflap <[EMAIL PROTECTED]> wrote:
>
> Hi there,
>
> I would like that when I change the dataProvider of my tree so it
redraw
> itself, the items open stay open.
> I try to deal with the openItems property and the valueCommit event but
> maybe this event is fire to soon ?
>
> --
> Flapflap[at]sans-facon.net --
> DevBlog : http://www.kilooctet.net
>








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