Hi there,

I have a form with a 'Save' button. I have also placed an icon with this
button using the 'icon='/assets/save.gif' attribute. By default I have this
button disabled and I enable it only when validation returns success. This
works great!

However, I have noticed that although the button is disabled, the icon does
not look like disabled :-(

For that I have designed a disabled button, and I am now trying to change
the icon (programmatically) when the validation succeeds.

This is my function that enables/disabled the button:

private function handleValid(eventObj:ValidationResultEvent):void {
    if(eventObj.type==ValidationResultEvent.VALID) {
     saveButton.enabled = true;
    }
    else
     saveButton.enabled = false;
   }

I have tried to add a new property, like saveButton.icon =
'/assets/enabled_button.gif'; so that my icon looks enabled/disabled
according to the button status. However this attribute does not really exist
:-( Is there any way to overcome this problem?

thanks,
George

Reply via email to