0 Replies Latest reply on Aug 10, 2007 1:35 PM by levancho

    TittleWindows does not resize

    levancho Level 3
      I have extremly amature question but I am still not clear after reading SDk all day long anfd finding all those invalidateXX methods that do not seem to help , anyways here is my problem :
      I have tittleWindow that has ViewStack which has two mx:Box containers inside.

      first Box container width = 100px
      second Box width = 410 px.

      inside tittleWindow I have listener for viewstack change (wheneve viewstack changes its selected child ):
      .....
      this.myviewsStack.addEventListener(IndexChangedEvent.CHANGE,initSelectedStackProps);
      ........
      private function initSelectedStackProps(e:*) : void {
      ... some code ....
      Alert.show("width = "+this.myviewsStack.selectedChild.width);
      }
      when App loads TittleWindow pups up and I have Alert :

      Alert.show("width "+this.selectedChild.width);


      at Very First Load and very first time when Tittle Window pops-up
      Alert box says correct : width=100 .
      but if I close the tittleWindow and open it again and set selected child of viewStack to be second mx:Box then Alert says width=0?
      and visa versa
      (if very first time Tittle Window pops-up and selected item of viewStack is second Box , Alert says :width=410 but afterwards every time tittleWindow pups-up and viewStack selected item is first Box then it says width=0 for that box .)
      I have exhausted all my resources to get that working basically I want tittle window to resize whenever it shows up to reflect size of whatever its viewStac's selecteditem is. since I have different sized Boxes inside viewStack

      I appreciate all your advices.
      Kind Regards.