flex setting button width to text width
- by pfunc
I am creating a nav in flex that pulls in buttons dynamically from xml. THe problem i am having is setting the button width to the text width. currently the buttons are all the same width and if the text is larger then it just cuts off. I've tried a few ways of doing this:
Setting button width to 100%
On creation of the button try to set the width of the button to the text programmatically. Something like evt.target.width = evt.target.textWidth;
Anyone know the correct way to do this?