Flex 4: How to center a component that is larger than its container?
Posted
by Liviu
on Stack Overflow
See other posts from Stack Overflow
or by Liviu
Published on 2010-05-26T12:44:09Z
Indexed on
2010/05/26
12:51 UTC
Read the original article
Hit count: 251
Hi Everyone!
I am using Flex 4 Spark Components for this one.
I have a custom component that is larger than a certain container, and I need it to be centered in that container. Best using only MXML, styles and properties
This does not work as expected:
<s:BorderContainer x="300" y="300" width="200" height="200">
<s:Button label="Not centered" horizontalCenter="0" verticalCenter="0" width="300" height="250"/>
</s:BorderContainer>
Thanks!
© Stack Overflow or respective owner