I'm developing a WinForms application and on one form, I use a GroupBox to group related controls together. I would like to style the caption in a particular way (e.g. making the caption bold). By altering the styling for the GroupBox, I can customise the caption, but it also alters the styling for controls within the GroupBox.
So far, there aren't that many child controls, so I'm individually resetting their styles back to the default, but I figure there has to be a better way... but I haven't figured it out so far.
Is there a way?
The easiest way would be to put another panel inside the GroupBox, so that you only have to reset the font once.
There are plenty of other solutions, but they all require a lot more code. This keeps it nice and simple.