Is there a way to use a viewstack with a tree list

259 views Asked by At

I want to know if I can use a tree and when and item in the tree is clicked the viewstack changes to that certain item?

1

There are 1 answers

0
Ian T On BEST ANSWER

Yes. Try something like this:

<mx:Tree id="tree" click="viewStack.selectedChild = tree.selectedItem" />

If your dataprovider for the tree does not contain the ViewStack component you're looking for:

  1. Handle the tree click event
  2. Match the tree selectedItem to the component you want in the ViewStack
  3. Set ViewStack.selectedChild to that component

If you still need help, post some code!