I have the code below that displays information about a computer.
I am having trouble getting the s:VGroup to appear in the center of s:Group. It’s always slightly off-center…more to the left and the right.
Is there any way to make a group to always be in the center of its container?
I’ve tried both horizontalAlign=”center” and horizontalCenter=”center” but neither affect the horizontal positioning of that element.
Thanks!
<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>
1 Answer