Re:Re: [flexcoders] About how to implement UIComponent

2009-06-03 Thread j2me_soul
Here is the codes: override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void{ super.updateDisplayList(unscaledWidth, unscaledHeight); lal.setActualSize(unscaledWidth, unscaledHeight); } override protected function createChildren():void{

Re: [flexcoders] About how to implement UIComponent

2009-06-03 Thread Manish Jethani
On Wed, Jun 3, 2009 at 10:26 PM, Manish Jethani wrote: > 2009/6/3 j2me_soul : >>   override protected function measure():void{ >>    this.explicitMinWidth = this.explicitMinHeight = 50; >>   } >>  } > > Here you should set the meauredWidth, measuredHeight, and optionally > measuredMinWidth and me

Re: [flexcoders] About how to implement UIComponent

2009-06-03 Thread Manish Jethani
2009/6/3 j2me_soul : > > > Why the label can't be displaied on the srceen? >  public class rectElement extends UIComponent >  { >   private var lal:Label; >   public function rectElement() >   { >    super(); >   } You don't have to write a constructor if all you're going to do it call the superc

Re: [flexcoders] About how to implement UIComponent

2009-06-03 Thread Jeffry Houser
Step through the code. Will the labels height and width have any values at the time createChildren runs? Additionally you may need to set the width and height of 'this'. Additionally, isn't the measure method supposed o set the measuredWidth and measuredHeight values of your component? In the

[flexcoders] About how to implement UIComponent

2009-06-03 Thread j2me_soul
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"; a