The default behavior of property BackColor
of a TextBox
is as follows: when enabled, it is White
(SystemColors.Window
), when disabled it is Gray (not sure what SystemColor this is).
If I change the BackColor
property, the same color is used for both Enabled and Disabled. How do I reset the BackColor
property (after it has been changed previously) so that the behavior reverts to the default?
I have tried setting it back to SystemColors.Window
, but then the box stays white when disabled.
To change the background color of text in Console, use the Console. BackgroundColor Property in C#.
Changing background colors in Excel VBA is easy. Use the Interior property to return an Interior object. Then use the ColorIndex property of the Interior object to set the background color of a cell.
To change the background color, select the form in Visual Studio and locate the BackColor property in the Properties panel. There are a number of ways to specify a color. Color by name - Simply type in a color name into the BackColor value field (for example Red, Yellow, Cyan etc).
If you mean in the designer, you can just click into the BackColor property and delete whatever is in there and then press enter. This will reset the property back to its default value.
If you mean in code, you can set the BackColor property to Color.Empty, and this will have the same effect.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With