Reputation: 391734
I have a control that doesn't have Disabled/Enabled support for text, so I need to build that into it.
The question is simply this: If I want to pick the right system color so that this control has the same color of its disabled text as neighboring disabled labels, which system color should I pick? I've tried a few and none seem right, they're either a bit too light or a bit too dark.
In other words, suppose the ForeColor property is present, what should I write here:
myDefunctLabel.ForeColor = SystemColors.???;
Upvotes: 25
Views: 10419
Reputation: 64557
SystemColors.ControlDark
looks good on my screen. And this is from actually trying them. I tried most of the others and the shade is wrong.
But according to the docs, GrayText
is the one you need. Bear in mind I tried my sample on Windows 7 with Aero enabled, not sure if screen themes plays silly with the colouring here.
Upvotes: 21
Reputation: 11844
Probably SystemColors.Control will give a color which is required by you or probably this
Upvotes: 0