1 person found this helpful
You can do instead:
<s:HGroup verticalAlign="middle"> <s:CheckBox /> <s:Label text="Checkbox" /> <s:Label text="Label" /> </s:HGroup>
Yes, it looks better but then the box will look moved downwards relative to the labels.
Is it a Flex bug? Why does the staightforward solution doesn't work?
I've found a solution:
<s:HGroup verticalAlign="middle" >
<s:CheckBox label="Checkbox" />
<s:Label text="Label" paddingTop="3"/>
But it seems very strange to me that in order to simply align components I have to find some magic constants to set as padding in px.
That's not a issue at all. It's just the way those controls are been displayed in the CheckBox skin.
You can reposition the checkmark or the label from CheckBox component by creating a custom Skin based on the default class spark.skins.spark.CheckBoxSkin.