PDA

View Full Version : Forgetful Tree...


Morrandir
05-07-2007, 12:38 PM
I have following tree:
import mx.controls.Tree;

var myTree:Tree = this.createClassObject(Tree, "myTree", this.getNextHighestDepth());
var tree_xml:XML = new XML("<node label='node1'><node label='value1'/><node label='value2'/></node>");

myTree.setSize(150,100);
myTree.dataProvider = tree_xml;
(See movie clip (http://stud.uni-wuerzburg.de/s166172/DA/Flash/Test/Tree.swf))

When I open node1 and select value1, then close node1 and reopen it... the tree unfortunately forgets, that I previously selected value1.
Is there a simple way to make the tree intelligent, so it keeps the previous selection in mind?