嵌套滚动无效

时间:2010-09-30 19:43:27

标签: flex flex4 adobe scroller

滚动条未显示的示例应用。在基于约束的布局中使用滚动条是否有任何理智的方法?

<?xml version="1.0" encoding="utf-8"?>

                  

<s:HGroup left="0" right="0" top="0" bottom="0">                
        <s:Scroller left="0" right="0" top="0" bottom="0">
            <s:VGroup>        
                <s:BorderContainer borderColor="0" width="500" height="500"/>
                <s:BorderContainer borderColor="0" width="500" height="500"/>
                <s:BorderContainer borderColor="0" width="500" height="500"/>
            </s:VGroup>
        </s:Scroller>    
</s:HGroup>

1 个答案:

答案 0 :(得分:0)

在“强制”左/右/宽度/高度等的每种可能组合之后找到解决方案

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication 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="500" height="400"
                       >
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>

       <s:HGroup left="0" right="0" top="0" bottom="0" >
        <s:Scroller width="100%" height="100%">
            <s:VGroup >        
                <s:BorderContainer borderColor="0" width="500" height="500"/>
                <s:BorderContainer borderColor="0" width="500" height="500"/>
                <s:BorderContainer borderColor="0" width="500" height="500"/>
            </s:VGroup>
        </s:Scroller>  
         </s:HGroup>

</s:WindowedApplication>