Remember back in the Flex 3 days where we had to set verticalScrollPolicy/horizontalScrollPolicy to off all the time? Well, no more of that. About the only thing that gets scrollBars automatically is the TextArea. You want scrollBars somewhere else then you have to use the <s:Scroller> class.

If you would like to make your Flex application scrollable and put a border around it then all you have to do is skin the application by setting its skinClass like so:

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx=""
     width="300" height="300"
     skinClass="skins.AppSkin" >
view source

Your AppSkin is simple. Just throw in a <s:Scroller> around the <s:Group id="contentGroup"> and then use FXG to throw a border around the whole mess and you can call it a day.



     <s:State name="normal" />
     <s:State name="disabled" />

     id="scroller" width="100%" height="100%"

     <s:Group id="contentGroup" left="0" right="0" top="0" bottom="0" />


Strokes are centered on the described shape.
So a width of 4 means we have to move the Rect 2 pixels
x and y and then make the Rect width/height 4 pixels less
than the actual width/height of the area we want to encompass.
Plus, we have to take into account the dimensions of the scrollbars.-->

<s:Rect x="1" y="1"
     width="{ hostComponent.width - scroller.verticalScrollBar.width - 2 }"
     height="{ hostComponent.height - scroller.horizontalScrollBar.height - 2 }">
          <s:SolidColorStroke color="#000000" alpha="0.5" weight="2" />


That's all.

What do you think?