0

我有下面的代码显示有关计算机的信息。

我无法让 s:VGroup 出现在 s:Group 的中心。它总是稍微偏离中心......更多的左边和右边。

有没有办法让一个组始终位于其容器的中心?

我已经尝试了 Horizo​​ntalAlign="center" 和 Horizo​​ntalCenter="center" 但都不影响该元素的水平定位。

谢谢!

    <s:Group horizontalCenter="center" width="100%" top="10">
    <s:Rect x="0" y="0"  
            radiusX="4" radiusY="4" 
            height="100%" width="90%" left="10">
    </s:Rect>
    <s:VGroup top="20" left="20" bottom="20" right="20">
        <s:Label id="lblCPU"  text="{data.CPU}"/>
        <s:HGroup>
            <s:Label id="lblmodel"  text="{data.model}"/>
            <s:Label id="lblmemory"   text="{data.memory}"/>
        </s:HGroup>
        <s:Label id="lblHDD"  text="{data.HDD}"/>
        <s:Label id="lblUSB" text="{data.USB}"/>
    </s:VGroup>
</s:Group>
4

1 回答 1

2
<s:Group x="435" y="77" width="200" height="200">
        <s:layout>
            <s:BasicLayout/>
        </s:layout>
        <s:VGroup width="50" height="50" horizontalCenter="0" verticalCenter="0">
        </s:VGroup>
</s:Group>
于 2012-05-09T20:30:13.473 回答