You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by mo...@comcast.net on 2013/06/20 17:19:14 UTC
how to horizontally align a Group located inside a VGroup?
Hi Experts,
I have the following rectangle and lines oriented correctly with each other
inside a Spark Group.
How would I then horizontally center this group in the VGroup (without changing
the alignment of the rect and lines within the Group)?
I tried using a horizontalCenter="0" in the Group declaration, but no effect.
<s:VGroup width="100%" height="100%" paddingBottom="20" paddingLeft="20" paddingRight="20" paddingTop="20" gap="0">
<s:Group id="dgGroup" width="300">
<s:Rect top="0" width="{this.dgGroup.width}" left="-1" height="50">
<s:stroke>
<s:SolidColorStroke color="0xff0000" weight="1"/>
</s:stroke>
</s:Rect>
<s:Line id="l1" left="-1" top="-1" bottom="-1">
<s:stroke>
<s:SolidColorStroke color="0xffffff" weight="1" />
</s:stroke>
</s:Line>
<s:Line id="l2" left="0" top="-1" bottom="0">
<s:stroke>
<s:SolidColorStroke color="0x00FF00" weight="1"/>
</s:stroke>
</s:Line>
</s:Group>
</s:VGroup>
Re: how to horizontally align a Group located inside a VGroup?
Posted by mo...@comcast.net.
Works perfectly! Thanks so much!
----- Original Message -----
From: "Evyatar Ben Halevi-Arbib" <ev...@gmail.com>
To: users@flex.apache.org
Sent: Thursday, June 20, 2013 8:29:32 AM
Subject: Re: how to horizontally align a Group located inside a VGroup?
Change the horizontalAlign property of the VGroup itself.
Good luck,
Evyatar
On Thu, Jun 20, 2013 at 6:19 PM, <mo...@comcast.net> wrote:
> Hi Experts,
>
> I have the following rectangle and lines oriented correctly with each other
> inside a Spark Group.
>
> How would I then horizontally center this group in the VGroup (without
> changing
> the alignment of the rect and lines within the Group)?
>
> I tried using a horizontalCenter="0" in the Group declaration, but no
> effect.
>
>
> <s:VGroup width="100%" height="100%" paddingBottom="20" paddingLeft="20"
> paddingRight="20" paddingTop="20" gap="0">
>
> <s:Group id="dgGroup" width="300">
>
> <s:Rect top="0" width="{this.dgGroup.width}" left="-1" height="50">
> <s:stroke>
> <s:SolidColorStroke color="0xff0000" weight="1"/>
> </s:stroke>
> </s:Rect>
>
> <s:Line id="l1" left="-1" top="-1" bottom="-1">
> <s:stroke>
> <s:SolidColorStroke color="0xffffff" weight="1" />
> </s:stroke>
> </s:Line>
>
> <s:Line id="l2" left="0" top="-1" bottom="0">
> <s:stroke>
> <s:SolidColorStroke color="0x00FF00" weight="1"/>
> </s:stroke>
> </s:Line>
>
> </s:Group>
>
> </s:VGroup>
>
Re: how to horizontally align a Group located inside a VGroup?
Posted by Evyatar Ben Halevi-Arbib <ev...@gmail.com>.
Change the horizontalAlign property of the VGroup itself.
Good luck,
Evyatar
On Thu, Jun 20, 2013 at 6:19 PM, <mo...@comcast.net> wrote:
> Hi Experts,
>
> I have the following rectangle and lines oriented correctly with each other
> inside a Spark Group.
>
> How would I then horizontally center this group in the VGroup (without
> changing
> the alignment of the rect and lines within the Group)?
>
> I tried using a horizontalCenter="0" in the Group declaration, but no
> effect.
>
>
> <s:VGroup width="100%" height="100%" paddingBottom="20" paddingLeft="20"
> paddingRight="20" paddingTop="20" gap="0">
>
> <s:Group id="dgGroup" width="300">
>
> <s:Rect top="0" width="{this.dgGroup.width}" left="-1" height="50">
> <s:stroke>
> <s:SolidColorStroke color="0xff0000" weight="1"/>
> </s:stroke>
> </s:Rect>
>
> <s:Line id="l1" left="-1" top="-1" bottom="-1">
> <s:stroke>
> <s:SolidColorStroke color="0xffffff" weight="1" />
> </s:stroke>
> </s:Line>
>
> <s:Line id="l2" left="0" top="-1" bottom="0">
> <s:stroke>
> <s:SolidColorStroke color="0x00FF00" weight="1"/>
> </s:stroke>
> </s:Line>
>
> </s:Group>
>
> </s:VGroup>
>
Re: how to horizontally align a Group located inside a VGroup?
Posted by Alex Harui <ah...@adobe.com>.
Vgroup implies layout and ignores many properties like alignment.
On 6/20/13 8:19 AM, "modjklist@comcast.net" <mo...@comcast.net> wrote:
>Hi Experts,
>
>I have the following rectangle and lines oriented correctly with each
>other
>inside a Spark Group.
>
>How would I then horizontally center this group in the VGroup (without
>changing
>the alignment of the rect and lines within the Group)?
>
>I tried using a horizontalCenter="0" in the Group declaration, but no
>effect.
>
>
><s:VGroup width="100%" height="100%" paddingBottom="20" paddingLeft="20"
>paddingRight="20" paddingTop="20" gap="0">
>
> <s:Group id="dgGroup" width="300">
>
> <s:Rect top="0" width="{this.dgGroup.width}" left="-1"
>height="50">
> <s:stroke>
> <s:SolidColorStroke color="0xff0000" weight="1"/>
> </s:stroke>
> </s:Rect>
>
> <s:Line id="l1" left="-1" top="-1" bottom="-1">
> <s:stroke>
> <s:SolidColorStroke color="0xffffff" weight="1" />
> </s:stroke>
> </s:Line>
>
> <s:Line id="l2" left="0" top="-1" bottom="0">
> <s:stroke>
> <s:SolidColorStroke color="0x00FF00" weight="1"/>
> </s:stroke>
> </s:Line>
>
> </s:Group>
>
></s:VGroup>