Search code examples
apache-flexlayoutflex4mxmlscroller

Flex 4 Scroller component doesn't render horizontal scrollbar


I'm pretty sure my dynamic mxml layout must give me two scrollbars (horizontal and vertical) but it only shows vertical one. Am I missing something or is it a bug?

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
               xmlns:s="library://ns.adobe.com/flex/spark" 
               xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%" xmlns:local="*">
    <fx:Script>
        <![CDATA[
            import mx.collections.ArrayCollection;

            [Bindable]
            public var myData:ArrayCollection = new ArrayCollection([
                {name:"Jane"},
                {name:"Sonny"},
                {name:"Alicia"}
            ]);
        ]]>
    </fx:Script>
    <s:Scroller width="100%" height="100%">
        <s:VGroup>
            <s:Group minHeight="600" minWidth="800" height="100%" width="100%">
                <mx:HDividedBox id="div1" width="100%" height="100%" autoLayout="true" liveDragging="true">
                    <mx:DataGrid width="100%" height="100%" dataProvider="{myData}"/>
                    <mx:DataGrid width="100%" height="100%" dataProvider="{myData}"/>
                </mx:HDividedBox>
            </s:Group>
        </s:VGroup>
    </s:Scroller>
</s:Application>

Solution

  • Remove the VGroup inside the Scroller or change it to Group! Seems that the horizontal scrollbar is not shown when using VGroup as first child