2 Replies Latest reply on Oct 20, 2008 2:54 PM by cdub

    background color for enabled=false

      I'm trying to set the background color of a button with enabled set to false. I was able to change the color of the text using: disabledColor: #000000;

      As far as the background color I've guessed: disabledRollOverColor: #ffffff; and disabledColorBackground: #ffffff; and backgroundDisabledColor: #ffffff; but none of these do the trick. Does anyone know how to change this?
        • 1. Re: background color for enabled=false
          -Hob Level 1
          The default flex button skin does not support separate fill colors for a disabled state. You'll need to create your own button skin class and code for the new fill colors yourself. It shouldn't be that hard. Just create an extension of mx.skins.halo.ButtonSkin and override updateDisplayList().

          In it, you'll do something like:

          case 'disabledSkin':
          case 'selectedDisabledSkin':
          //Copy super class's code and modify to your needs
          super.updateDisplayList(unscaledWidth, unscaledHeight);

          Then in your stylesheet just set the skin for your button to a ClassReference that points to your new skin class.
          • 2. Re: background color for enabled=false
            cdub Level 1
            Ouch! Not as easy as I had hoped. I'll give this a whirl.

            Thanks for getting back to me!