no one has an idea ?
coulix
2008-11-30 07:45:21
Add a listener on creationComplete event and you can use this code:
private function OnCreationComplete(event: Event): void
{
if (event.target is Button)
{
var button: Button = (event.target as Button);
var icon: DisplayObject = button.getChildByName("upIcon");
if (icon) // check icon existence
{
button.width = icon.width;
button.height = icon.height;
}
}
}
Should work...