I have tried to create an instance of Button class inside an itemRenderer element instance, but the button instance appears without its skin.
can someone explain me :
- Why does it happends ?
- How to fix it ?
- Am I doint it right or not ?
override protected function createChildren():void
{
super.createChildren();
btnControl = new Button();
btnControl.x = 2;
btnControl.y = 22;
btnControl.minHeight = 18;
btnControl.minWidth = 50;
btnControl.height = 18;
btnControl.width = Number( undefined );
btnControl.label = "контрол";
btnControl.addEventListener( MouseEvent.CLICK, onBtnControlClick );
}
As far as I can tell from your code you’re not adding the button to the displayList. Add
at the end if this is a Spark component you’re extending; if it’s an mx component use