
Hi...
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

Ans:
I noticed that using the whole Application as the Container in the example, the Component would center itself even when larger than the Stage. I cannot use another Application, so I used the next inherited class: SkinnableContainer, instead of BorderContainer, in the above example. It works properly.
Thanks