3 Replies Latest reply on Dec 22, 2010 5:13 PM by huangxinghui

    Dynamic load data, the scroll not exists

    huangxinghui Level 1

      when click the item, call service load data, then expand it. The scroll not show.

       

      but then close it and expand it again, the scroll is visible.

       

      How to let the scroll visible in the first time?

       

      Thanks

        • 1. Re: Dynamic load data, the scroll not exists
          Flex Rock Level 1

          Hi,

           

                  Can you explain it a little more elaborately.

           

          Thanks

          Jayagopal.

          • 2. sorry
            huangxinghui Level 1

            sorry

             

            the code like this:

             

            private function itemOpenHandler():void
                           {
                                callLater(function():void
                                {
                                     tree.selectedItem.children = new ArrayCollection([
                                          {label:"test", children:new ArrayCollection()},
                                          {label:"child"},
                                          {label:"child"},
                                          {label:"child"},
                                          {label:"child"},
                                          {label:"child"},
                                          {label:"child"},
                                          {label:"child"},
                                          {label:"child"}
                                          ]);
                                     
                                     ac.itemUpdated(tree.selectedItem, "children");
                                });
                           }
            <mx:Tree id="tree" dataProvider="{ac}" width="200" height="200" itemOpen="itemOpenHandler()"/>
            

             

             

            when i first expand the item whose label is "test", the vertical scroll bar does not show. then close it and expand again, vertical scroll bar is visible.

             

            what is the reason?

            • 3. Re: sorry
              huangxinghui Level 1
              //the variable ac define
              
              [Bindable]
              private var ac:ArrayCollection = new ArrayCollection([
                                            {label:test, children:new ArrayCollection()},
                                            {label:child},
                                            {label:child},
                                            {label:child},
                                            {label:child},
                                            {label:child},
                                            {label:child},
                                            {label:child},
                                            {label:child}
                                            ]);