apache-flexflashtreeadobeviewstack

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


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?


Solution

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