DisabledBackColor, DisabledForeColor

These properties determine the appearance of a control when it's disabled (that is, when its Enabled property is .F.).

Usage

oObject.DisabledBackColor = nColor
nColor = oObject.DisabledBackColor
oObject.DisabledForeColor = nColor
nColor = oObject.DisabledForeColor
The docs say both disabled forecolors and backcolors colors are dithered with gray, but as far as we can tell, this doesn't apply at all to backcolors and applies to forecolors only for some controls.

Example

* match an object's disabled colors to its regular colors
* with the dithering of the forecolor, this should result
* in the back remaining the same and the lettering dimming
* for those controls so affected.
This.DisabledBackColor = This.BackColor
This.DisabledForeColor = This.ForeColor

See Also

BackColor, DisabledItemBackColor, DisabledItemForeColor, ForeColor, GetColor(), RGB()


Back to Table of Contents

Copyright © 2002-2018 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. Click for license .