Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change the border thickness of a Groupbox on a windows form in C#?

I didn't find any solution that helped me on the older questions on SO... Is it possible to make them thicker or just more visible by changing the color? If yes, some code would be great... or just a hint how to do it...

like image 640
asdasdad Avatar asked Jun 12 '12 13:06

asdasdad


Video Answer


2 Answers

You'll need to make a custom GroupBox control. See The Grouper - A Custom Groupbox Control

like image 195
SwDevMan81 Avatar answered Oct 10 '22 04:10

SwDevMan81


GroupBox is a custom drawn .Net control. You will need to hook into the Paint event, or derive from the GroupBox and override the OnPaint method, determine where the existing lines are being drawn and then draw overtop of them with wider lines to achieve the thicker border. Or you can create a custom control and paint everything yourself.

like image 41
Jake1164 Avatar answered Oct 10 '22 03:10

Jake1164