VB.Net / Winform - draw a line?
I'm using visual studio 2010 and vb.net. On my form I have an Group Box that I use to visually segment various 开发者_如何学Pythoncontrols 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?
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.
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.
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.)
精彩评论