Hi,
I'm trying to create a simple layout of 3 horizontal Label/Text components. I'd like the components to resize depending on their text content, which will change at runtime.
The components should look something like this:
<mx:Label text="{firstNum}" />
<mx:Label text="-" />
<mx:Label text="{secondNum}" />
The output would look like "0-1" or "1-99" or "1000-9999".
My problem is that the default width of the Label is wider than it's content (even with paddings set to 0), and if I set an explicit width larger numbers will be truncated when the bound variables are updated.
So, I want to create a Label that is exactly as wide as it's content, even when that content is a single character.
On screen the text from the 3 Labels should look the same as if all the text was entered in a single Label.
(I need to keep the text in separate components so I can play effects on firstNum/secondNum individually.)
Seems like it should be easy enough, right?
Thanks! Stu