2 Replies Latest reply on Apr 4, 2008 4:06 AM by willkanoff

    Stupid Tree question...

    willkanoff
      Why is the Tree Control stops animating with more then 19 nodes? Answers like "learn more about Flex..." or "you are an idiot..." are also accepted...
        • 1. Re: Stupid Tree question...
          dietmar.paulus Level 1
          Hey

          Because, the developers made this. Look at the documentation

          expandItem () method
          public function expandItem(item:Object, open:Boolean, animate:Boolean = false, dispatchEvent:Boolean = false, cause:Event = null):void

          Opens or closes a branch item. When a branch item opens, it restores the open and closed states of its child branches if they were already opened. If you set dataProvider and then immediately call expandItem() you may not see the correct behavior. You should either wait for the component to validate or call validateNow().

          Parameters
          item:Object — Item to affect.

          open:Boolean — Specify true to open, false to close.

          animate:Boolean (default = false) — Specify true to animate the transition. (Note: If a branch has over 20 children, it does not animate the first time it opens, for performance reasons.)

          dispatchEvent:Boolean (default = false) — Controls whether the tree fires an open event after the open animation is complete.

          cause:Event (default = null) — The event, if any, that initiated the item open action.
          • 2. Re: Stupid Tree question...
            willkanoff Level 1
            Hey dietmar

            Thanks a bunch! That really helped. I had a feeling it was a preprogrammed feature but couldn't figure out the best way to override it. Thanks again!