Hi,
what are the background and foreground colors of a textbox when it's disabled in .net ?
Hi,
what are the background and foreground colors of a textbox when it's disabled in .net ?
This depends on the styles that you've defined in Windows, unless you're specifiying the color that should be used explicitly (and choose one that is not dependent on Windows settings)
From the System.Drawing.SystemColors class, use SystemColors.GrayText
for the foreground color. From a quick test, I believe SystemColors.Control
is the background color, although the documentation does not state this.