I tried;

                public function ValidatedCheckBox()
                {
                        super();
                        this.addEventListener(Event.CHANGE,_eventHandler)
                        this.addEventListener(FlexEvent.CREATION_COMPLETE, 
init);
                }
                public function init(event:FlexEvent):void
                {
                        this.removeEventListener(FlexEvent.CREATION_COMPLETE, 
init)
                        this.setStyle("disabledColor",this.getStyle("color"));
                        
this.setStyle("disabledIconColor",this.getStyle("iconColor"));
                }

With no luck.

Paul

--- In flexcoders@yahoogroups.com, "ppongtong" <ppongt...@...> wrote:
>
> 
> 
> How about...
> 
> public function ValidatedCheckBox()
> {
>    super();
>    this.addEventListener(FlexEvent.CREATION_COMPLETE, handleCreationComplete);
> }
> 
> public function handleCreationComplete(pEvent :FlexEvent) :void
> {
>    this.removeEventListener(FlexEvent.CREATION_COMPLETE, 
> handleCreationComplete);
>    this.setStyle( "disabledColor" , this.getStyle("color") );
> }
> 
> Panhathai
>


Reply via email to