Hi everybody !
I would like to automaticaly resize my button (spark button) according it content (label text) ?
Thanks all for your help !
Anthony
Hi everybody !
I would like to automaticaly resize my button (spark button) according it content (label text) ?
Thanks all for your help !
Anthony
Anthony,
This should happen by default, if you don't explicitly define a width for the control.
Z
The button is automatically resized once you addChild(...) your Button.
Dear all,
In my button skin, i specified width. So, my button is never automaticaly resized (with big or small label text inside) ...
So have you got some code examples to do this ?
Thanks a lot
Anthony
Ok, I found a solution :-)
public class MyButton extends Button
{
public function MyButton()
{
super();
}
override protected function measure():void
{
super.measure();
this.width = this.measuredWidth;
}
}
Now, my button is always correctly resize (width).
Thanks everybody
Anthony