Nikewatch
Nikewatch

Reputation: 252

Change the caption color of a groupbox but not the text in the groupbox?

I have a groupbox on my winform and I'd like to change the color of the caption / title but not use ForeColor as I don't want the text in the groupbox to change.

enter image description here

Upvotes: 3

Views: 1895

Answers (1)

Patrick Hofman
Patrick Hofman

Reputation: 156978

You could wrap the RadioButton in another Panel which you Dock Fill in the GroupBox. Then set the ForeColor of that Panel to SystemColors.ControlText.

This prevents the ForeColor of the RadioButton to be derived from the GroupBox.

Upvotes: 2

Related Questions