2 Replies Latest reply on Mar 17, 2008 9:41 AM by bowlinearl

    Flex 3 Window Resize Issue

      Hello all,

      I'm a beginning Flex programmer and I've run into an issue I don't know how to resolve. The problem is this: when my app is compiled under Flex 2 all of my window components resize nicely when the browser window is resized (<mx:Application width="100%" height="100%">). However, when I compile under Flex 3 this doesn't work; all components stay the same size and I get scrollbars at the edges of the browser window if I shrink the browser window.

      The backwards compatibility and migration documentation doesn't say anything about this functionality being changed. Anyone have any idea why this is happening, and how I can get the older functionality back?
        • 1. Re: Flex 3 Window Resize Issue
          SujitG Level 2
          Try setting the horizontalScrollPolicy and verticalScrollPolicy of the Application to "off".

          Hope this helps.
          • 2. Re: Flex 3 Window Resize Issue
            bowlinearl Level 1
            Setting the scroll policy to off certainly gets rid of the scrollbars, but it doesn't actually fix the resize behavior of the application.

            I ended up fixing this problem by cheating: I set up a resize handler for mx:Application that resizes the main Container in the app.

            <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" xmlns:custom="components.*" layout="absolute"
            width="100%" height="100%" minWidth="780" minHeight="580">
            try { bpanel.width = width; bpanel.height = height; }
            catch (err:Error) {}

            A hack, yes, but at least things work again.