2 Replies Latest reply on May 10, 2010 12:14 AM by David_F57

    Removing ControlBar from Panel

    Raghuvasa

      Hi All,

       

                     i have added controlBar dynamically to a Panel through actionscript in my application.

       

      how can i remove that dynamically added controlBar from the panel.

       

      i am using  like this

       

      panelObject.removeAllChildren();

       

      but its not working properly. its not removing.

       

      is there any other way to remove controlBar.

       

      Can any one help me regarding this?

       

      thanks in advance

       

      Raghu.

        • 1. Re: Removing ControlBar from Panel
          David_F57 Level 5

          hi,

           

          how did you add the controlbar ?

           

          you can hide the controlbar with mypanel.controlBarVisible=false;

           

          David.

          • 2. Re: Removing ControlBar from Panel
            Raghuvasa Level 1

            Hi David.

             

                 Thanks for Reply.

             

                 Here is the code how i am adding controlBar to the panel

             

                 var controlBar:ControlBar = new ControlBar();


                       controlBar.height = 30;
                          
                panel.addChild(controlBar);


               its working fine while adding.

             

              But  after some time i need to add one image to panel. while adding image to panel i need to add controlBar to Panel once again.

               so i need to remove the firstly added controlBar and i have to add new ControlBar.

             

              but its not removing the firstly added controlBar.

             

              pls help me regarding this.

             

            Thanks

            Raghu