flex setting button width to text width
Posted
by pfunc
on Stack Overflow
See other posts from Stack Overflow
or by pfunc
Published on 2010-03-28T16:40:26Z
Indexed on
2010/03/28
16:43 UTC
Read the original article
Hit count: 263
flex
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?
© Stack Overflow or respective owner