Quick Tip: Horizontal And Vertical Scrollbars For A Spark Application

If I remember correctly it used to be native for Flex 3 application to show scrollbars when application content exceeded application width or height. In spark a little hack is needed:

<s:Application ...>
    <s:Scroller width="100%" height="100%">
        <s:Group>
            <s:VGroup width="100%">
                <views:Header id="header" width="100%" />
                <s:BorderContainer width="100%" height="300" borderWeight="5"/>
           </s:VGroup>
        </s:Group>
    </s:Scroller>
</s:Application>

Notice s:VGroup nested inside s:Group component. This is in fact the hack to make both vertical and horizontal scrollbars appear correctly.

1 comment so far

  1. jenicek July 2, 2011 01:52

    You saved my life! Thanks a lot…

Leave a comment

Please be polite and on topic. Your e-mail will never be published.