1 Reply Latest reply on Aug 31, 2010 9:54 PM by supersonicecho

    Panel resize problem

    Devtron Level 3

      Hello,

       

      I have two panels inside of a VBOX, both are set visible=false to the user.

       

      I need to display both panels in the same X, Y positions. Like so:

       

                      multiPanel.y = singlePanel.y;
                      multiPanel.x = singlePanel.x;

       

      The multiPanel is defined after the singlePanel. I need multiPanel to appear exactly where singlePanel appears.

       

      This works fine, except for the first time it is dispalyed. No matter what I do, the multiPanel displays at the bottom of the browser, and will only relocate itself correctly when displayed twice.

       

      Why is this happening with my second panel? Even on CreationComplete of the MXML, if I use the code it doesnt work:
                      multiPanel.y = singlePanel.y;
                      multiPanel.x = singlePanel.x;

                      multiPanel.visible = true;

       

      It works fine after the code is called twice. Why wont it work the first time around?