Layout problems with a rotated Label component

view source

I’m having a problem getting an <HBox> to layout a rotated <Label>

I’ve tried all sorts of combinations of maxWidth/Height, measuredWidth/Height with no luck. I’d appreciate it if you would comment with an explanation or point me to a resource that explains how this can be fixed.

Here’s the gist of the code below or you can view source to see everything.

<mx:HBox x="20">
<mx:Label text="First Label" rotation="90" />
<mx:Label text="Second Label" rotation="90" />
<mx:Label text="Third Label" rotation="90" />
</mx:HBox>

Here’s a similar version with borderStyles set to inset so that you can see the containers. In this example I put each Label inside an HBox and rotated the HBox.

view source