ok so just to follow up its a bug IMO with Label.
I tired setting truncateToFit and no dice.
So i swapped out label for text and its hot.
mx:HBox width=100%
mx:Text text={text} truncateToFit=true/
mx:Spacer width=100% /
mx:Button id=button width=20 height=15/
/mx:HBox
I also tried a TextArea without setting truncateToFit and it worked too.
crap like this makes me glad I'm mostly an AS dev.
From: Flex Noob fl3xn...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Sunday, February 1, 2009 9:56:28 PM
Subject: [flexcoders] Simple but impossible Hbox alignment issue
This one is rather perplexing. If I use a label inside an hbox and if the text
inside the label runs too long it pushed the button off the screen:
mx:HBox width=100%
mx:Label text={text} /
mx:Spacer width=100% /
mx:Button id=button width=20 height=15/
/mx:HBox
Doesn't Flex tell the label what is maxWidth should be so that doesn't
happen