2 Replies Latest reply on Jul 13, 2006 9:00 AM by Stefan08

    bug in vbox:addchild()

    Stefan08
      hello,

      i don't know if there is bug in vbox:addChild.
      In my application the users writes text into a popup and after the user closed the popup on the main window of my application i add a new child (ApplicationControlBar) to a vbox.
      On the first time it works but after the second time if the users closed the popup all childs are minimixed. I have set the minimum size of the ApplicationControlBar.

      My code looks like this

      public function addComment(text:String) : void
      {
      var mypanel:ApplicationControlBar = new ApplicationControlBar();
      var box:VBox = new VBox();
      //box.verticalScrollPolicy = "on";
      mypanel.width = 300;
      mypanel.height = 70;
      box.width = mypanel.width;
      box.height = mypanel.height;
      var author:Label = new Label();
      //author.width = mypanel.width;
      //author.height = mypanel.height;
      author.text = StoerungFlexMVC1(Application.application).user.selectedLabel;

      var commentText:TextArea = new TextArea();
      //commentsTest.text = text;
      //commentText.
      commentText.text = text;
      commentText.width = box.width;

      box.addChild(author);
      box.addChild(commentText);
      mypanel.addChild(box);
      comments.addChild(mypanel);

      }