2 Replies Latest reply on Jun 15, 2009 4:23 AM by tim_mickelson

    Highlight Tree item from selectedIndex

    tim_mickelson Level 1

        Hello,

       

        I am using Tree.selectedIndex to select an item in a Tree object. The node is not "highlighted" though. Does anyone know how I can highlight the selected item, as if I had "clicked" with the mouse?

       

        Greetings Tim Mickelson

        • 1. Re: Highlight Tree item from selectedIndex
          leybniz Level 4

          use selectedItem property instead of selectedIndex

          • 2. Re: Highlight Tree item from selectedIndex
            tim_mickelson Level 1

            Thanks, I have resolved this problem. The problem was that I needed to use the function callLater because before the selectedIndex I had used an expandItem function and this function is asynch and created this problem for me.

             

                        var array:Array = [treeIndex.selectedIndex];
                        this.callLater(selectIndex,array);

             

             

                        private function selectHelpCallBack(e:ResultEvent):void{
                            if(e.result!=null&&e.result is String){
                                textHelp.text = e.result as String;
                            }
                        }

             

             

              Greetings, Tim