I am having trouble with background colors in C#. For some reason they are simply not working. Specifically on the System.Windows.Forms.Panel control. Setting the BackColor property does nothing. All I have is gray and all the efforts I have made will not change it. Is there something that could be overriding this? Am I approaching this the wrong way?
A:
If you want to have the Panel Control the same color as the Form's background color, then you can use this:
myPanel.Parent = this;
... I hope this helps :)
baeltazor
2010-02-06 17:35:11
except in compact framework ;)
Stormenet
2010-02-06 17:36:40
..True, Thanks for that @Stormenet :)
baeltazor
2010-02-06 17:38:48
A:
I have had instances where controls must have both the foreground and background colors specified, you might want to try setting the foreground color explicitly as well, to see if that works.
JYelton
2010-02-11 01:08:30