Link to home
Start Free TrialLog in
Avatar of curiouswebster
curiouswebsterFlag for United States of America

asked on

Making a line as a divider in WinForms

Using Visual Studio Pro 2008 I can ont put a simple line in my dialog to divide controls.

Am I missing something?

newbieweb
Avatar of curiouswebster
curiouswebster
Flag of United States of America image

ASKER

Actually, I wouls llikw a way to divide up the dialog's controls so they appear to be grouped. Can someone suggest how to do this?

ASKER CERTIFIED SOLUTION
Avatar of p_davis
p_davis

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
could you please elaborate?
Avatar of p_davis
p_davis

groupbox would probably be your best bet -- allows a label up top and you just drag controls to it. its in your toolbox.
draws a lined rectangle around your controls
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
sorry @p_davis, didn't see your post regarding groupbox...
its all good. thanks for the nod though
For this program I do not have resizing as a requirement. I just have very quick turn around time of the GUI.

I just want to divide controls into groups as you have done above. Is that a simple group box?
othere than the grids sedqwick does use groupbox for the grouping
yes, groubox control from the toolbox.
I have used a group box and think that's what I need. But I would like to make the line more visible.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
There is a panel divider control.   I usually use it with a left dock and a fill. so that way if the user really wants the left panel wider they can manually drag it.

in 2005 its the "Splitter"  or you can go with a "SplitContainer" which will put two panels and the splitter on the form.
thanks.
p_davis said:

   "doesn't look like there is an absolutely easy way to do it. again to do it you will have to handle that controls paint event and overlay lines where they are drawn or derive your own control."

Did you miss emoreau's post back here:
https://www.experts-exchange.com/questions/25027076/Making-a-line-as-a-divider-in-WinForms.html#26200381

The Power Packs can be used in a C# app as well.  =)

See the "Line and Shape controls" section: http://msdn.microsoft.com/en-us/vbasic/bb735936.aspx
that's great but i was referring to the groupbox.
Gotcha....