Question

Why does the following button not line up 100px from the left edge?

<mx:Button left="100"></mx:Button>

I am using the Flex 4(Gumbo) SDK, I am pretty sure that if you try to do it in FlashBuilder, it would work.

Was it helpful?

Solution

Are you using absolute or relative layout?

<mx:Application Layout="absolute">

And if trying either of those doesn't work... I don't think I've ever seen someone use "left" (I'm sure it works, but it looks odd to me). Try changing "left" to "x":

<mx:Button x="100" />

OTHER TIPS

Check if you have it nested in some other component.

In this example button will be placed 200px left (100px for panel + 100px button for button left attribute)

<s:Panel x="100" y="100" width="250" height="200">
    <mx:Button left="100"></mx:Button>
</s:Panel>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top