Share via


DisabledBackColor, DisabledForeColor Properties

Specifies the background and foreground colors for a disabled control. Read/write at design time and run time. There are two versions of the syntax for each property.

Control.DisabledBackColor[ = nColor]

Control.DisabledBackColor = RGB(nRedValue, nGreenValue, nBlueValue)

Control.DisabledForeColor[ = nColor]

Control.DisabledForeColor = RGB(nRedValue, nGreenValue, nBlueValue)

Return Value

  • nColor
    Specifies a single number to represent the color.

  • nRedValue, nGreenValue, nBlueValue
    Specifies three separate color intensities that compose the control's foreground color or background color. You must use the RGB( ) function with these values to consolidate the three color components into one number.

Remarks

Applies To: CheckBox Control | ComboBox Control | CommandButton Control | EditBox Control | Label Control (Visual FoxPro) | ListBox Control | OptionButton Control | Spinner Control | TextBox Control (Visual FoxPro)

The color you specify is dithered with gray.

Note

In the Properties window, you can double-click any of the color properties to display the Color dialog box. You can choose or define colors from this dialog box. The red, green, and blue intensities that correspond to the color you choose become the settings for these properties after you close the Color dialog box.

The color settings, or Themes, of the operating system set the default color settings for the DisabledBackColor and DisabledForeColor properties.

If the Themes property is set to True (.T.), setting the DisabledBackColor property value produces a 35% transparency overlay on top of the themed button. This produces a colorizing effect.

See Also

Reference

BackColor, ForeColor Properties

Other Resources

Properties (Visual FoxPro)

Language Reference (Visual FoxPro)