Why the label can't be displaied on the srceen?
 public class rectElement extends UIComponent
 {
  private var lal:Label;
  public function rectElement()
  {
   super();
  }
  override protected function createChildren():void{
   if( lal == null ){
    lal = new Label;
    lal.text = "Label";
    addChild(lal);
    this.explicitWidth = lal.width;
    this.explicitHeight = lal.height;
   }
  }
  override protected function measure():void{
   this.explicitMinWidth = this.explicitMinHeight = 50;
  }
 }
 
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute" 
mlns:local="*">
 
<local:rectElement >
 /* there is nothing on the screen. Where is the Label ? */
</local:rectElement>
</mx:Application>

 

Reply via email to