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{
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
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
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
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
5 matches
Mail list logo