【问题标题】:TileGroup overflows bounds, diplays chidren outside containerTile Group 溢出边界,在容器外显示子项
【发布时间】:2011-08-26 03:05:46
【问题描述】:

我有以下代码:

        <s:BorderContainer id="myBorder" 
                width="78" height="78"
                horizontalCenter="0"
               >


        <s:Scroller id="myScroller" horizontalScrollPolicy="off" >

            <s:TileGroup id="thingyList" 
                height="78" 
                focusEnabled="true" 
                horizontalGap="4"
                verticalGap="4" 
                mouseOver="thingyList_mouseOverHandler(event)" 
                paddingBottom="0" paddingLeft="0" paddingRight="0" paddingTop="0" 
                requestedColumnCount="3"
                requestedRowCount="3"
                maxHeight="78"
                maxWidth="78"
                bottom="row1:3"
                verticalScrollPosition="70"
                horizontalAlign="center"
                verticalAlign="middle"
                clipAndEnableScrolling="true"
                />

        </s:Scroller>

    </s:BorderContainer>

我遇到的问题是,当项目添加到 tileGroup 时,tile 组的垂直显示超出了它的边界,因此显示了 +- 3 1/2 行数据。!

真的快把我逼疯了!有什么想法吗?

谢谢!,

mce

【问题讨论】:

    标签: apache-flex air flash-builder mxml


    【解决方案1】:

    滚动条在 Spark 架构中很棘手。

    给 Scroller 一个明确的高度和宽度;将 TileGroup 设置为 100% 的高度和宽度。

        <s:Scroller id="myScroller" horizontalScrollPolicy="off" height="78" width="78" >
    
            <s:TileGroup id="thingyList" 
                height="100%" 
                focusEnabled="true" 
                horizontalGap="4"
                verticalGap="4" 
                mouseOver="thingyList_mouseOverHandler(event)" 
                paddingBottom="0" paddingLeft="0" paddingRight="0" paddingTop="0" 
                requestedColumnCount="3"
                requestedRowCount="3"
                maxHeight="78"
                maxWidth="78"
                bottom="row1:3"
                verticalScrollPosition="70"
                horizontalAlign="center"
                verticalAlign="middle"
                clipAndEnableScrolling="true"
                width="100%"
                />
    
        </s:Scroller>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-07-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多