Reputation: 2111
I'm using visual studio 2010 and vb.net. On my form I have an Group Box that I use to visually segment various controls on the form. My question is how can I add a horizontal line that looks the same as the border lines of the Group Box?
Upvotes: 1
Views: 4331
Reputation: 941218
Jonathan is a heckofalot closer then he might have thought. Add a GroupBox, set the Text property to an empty string, change the Size property to make the Height equal to 2. Presto, horizontal carved battle-ship gray line like seen on many dialogs.
Upvotes: 1
Reputation: 3206
I'm not sure how an option box would visually segment controls, but have a look at the LineShape control in the Visual Basic PowerPacks (from Microsoft).
(Google "Visual Basic PowerPacks", download it from MS, then install it.)
Upvotes: 0
Reputation: 67175
My preference would be to use a group box, as this is more standard.
If you need something custom, use write your own Paint handler to paint whatever you need.
Upvotes: 0