Center label instance inside VGroup in Flex
Posted
by Jerry
on Stack Overflow
See other posts from Stack Overflow
or by Jerry
Published on 2010-05-09T02:21:32Z
Indexed on
2010/05/09
2:28 UTC
Read the original article
Hit count: 254
Hi all I am trying to center my labels below my image inside my VGroup. The labels are align to left now and it seems like HorizontalAlign is not working on spark component. Anyone knows how to fix it? Thanks a lot.
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:VGroup width="800">
<mx:Image source="images/big/city1.jpg"/>
<s:Label text="test1" horizontalCenter="0" /> //doesn't work....:(
<s:Label text="test2" />
</s:VGroup>
</s:Application>
© Stack Overflow or respective owner