-5

I am using MS VS 2010 for a Windows Forms project.

When I added a GroupBox control to the form the label of the control was outputted in the Black color though the property ForeColor was set automatically to Yellow that is to the ForeColor of the form itself.

Only after I resetted this property anew changing the color of the property from Yellow to some other color and then again to the Yellow color the label was displayed in Yellow.

Is it a bug of MS VS 2010 or I did something wrong?

That is I want to say that the property ForeColor of the control after adding it to the form though it was setted was totally ignored.

Vlad from Moscow
  • 301,070
  • 26
  • 186
  • 335

1 Answers1

0

The ForeColor of the GroupBox is not related to the Form ForeColor. Many controls do but GroupBoxes do not take the Form ForeColor. You should change GroupBox ForeColor if you want it to be yellow.

Nejdi Kroi
  • 612
  • 1
  • 6
  • 17
  • So is it a bug of MS VS 2010? – Vlad from Moscow Aug 05 '15 at 15:25
  • It is not a bug, Visual Studio 2013 also has this setting by default. It is just something normal in Visual Studio WinForms. Just change the ForeColor of GroupBox – Nejdi Kroi Aug 05 '15 at 15:26
  • It simply means that MS VS 2010 and MS VS 2013 have the same bug.Otherwise it may be concluded that there are imbeciles in Microsoft.. Though the first does not prevent the second. – Vlad from Moscow Aug 05 '15 at 15:30
  • I am working with visual studio for a few months now and I must agree, there are imbeciles in Microsoft. About your issue, try this. Put a few buttons and labels and stuff on a form, and a groupbox. Now change the property ForeColor of the form to something else, say green. You will see all controls displaying their text in green, except the groupbox. And the worse part of it all is that lots of people find this normal behaviour.. Sorry, but this is a bug, plain and simple. Microsoft brainwashed people always call bugs "not a bug, is by design". Well if that is so bugs do not exists anywhere – GuidoG Aug 05 '15 at 18:55