嵌套滚动条不工作

发布于 2024-09-25 18:40:00 字数 683 浏览 7 评论 0原文

滚动条不显示的示例应用程序。有没有在基于约束的布局中使用滚动条的合理方法?

<?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>

A sample app where the scroller does not show up. Is there any sane way of using a scroller in a constrain based layout?

<?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>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

离线来电— 2024-10-02 18:40:00

在“暴力破解”左/右/宽度/高度等每种可能的组合后找到了解决方案

<?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>

Found the solution after "brute forcing" every possible combination of left/right/widt/height etc

<?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>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文