0 Replies Latest reply on Dec 13, 2006 9:50 PM by g00fymad

    viewstack.height + textarea.document.height

    g00fymad Level 1
      Hi to all,

      I have a Flex App, that is working nice but I want to be able to set the height of the primary viewstack to the height of the content of the textarea within the viewstack. I want the Flex App to only ever have one vertical scrollbar so it behaves like a 'normal' web page. I assume I will need to listen to the resize event of the App as well as some event on the textarea for when its data has loaded.

      The viewstack looks like this;

      <mx:ViewStack id="pageStack" width="100%" height="100%">

      <mx:Canvas label="homePage" width="100%" height="100%" showEffect="{showPage}" hideEffect="{hidePage}">

      <mx:TextArea id="homeText" left="5" top="0" right="5" bottom="0" styleName="contentText" editable="false">
      <mx:htmlText>{dummyContent}</mx:htmlText>
      </mx:TextArea>

      </mx:Canvas>

      <mx:Canvas label="desktopPage" width="100%" height="100%" showEffect="{showPage}" hideEffect="{hidePage}">

      <mx:TextArea id="desktopText" left="5" top="0" right="5" bottom="0" styleName="contentText" editable="false">
      <mx:htmlText>{dummyContent}</mx:htmlText>
      </mx:TextArea>

      </mx:Canvas>

      </mx:ViewStack>

      Can any help me please?
      Regards,
      Maurice