all groups > dotnet windows forms designtime > february 2006 >
You're in the

dotnet windows forms designtime

group:

Windows Froms 2.0 Horizontal Rule


Windows Froms 2.0 Horizontal Rule Josh Crosby
2/21/2006 9:11:30 AM
dotnet windows forms designtime:
I have searched high and low, tryed a picture box, 3D border, etc... doesn't
appear right, can someone help me with this, i'm sure it's really simple. How
do you put a horizontal rule, or seperator bar on a windows form, i.e. those
that are most commonly seen on dialog boxes.

Thanks in advance.

--
Re: Windows Froms 2.0 Horizontal Rule Josh Crosby
2/21/2006 12:17:27 PM
Thanks Tim,
I had another post from EE, which turned out pretty easy. thought i'd post
it as well.

Add a Label.
Set the AutoSize to False.
Set its BorderStyle to FixedSingle.
Adjust to your liking.
Set the Height to 1 in the Size property "180, 1".

--
Josh Crosby


[quoted text, click to view]
Re: Windows Froms 2.0 Horizontal Rule Tim Wilson
2/21/2006 1:40:52 PM
Sounds like you've tried creating a line using other controls with a 3D
border - which is one option.

However, if that's not turning out as you'd expect, another option is to
override the OnPaint method of the Form and use the ControlPaint class to
draw a border-style line
(http://msdn2.microsoft.com/en-us/library/system.windows.forms.controlpaint_
members.aspx).

A third option is to go through this
(http://www.codeproject.com/cs/miscctrl/hvrules1.asp) article and see if you
can use the controls that are developed.

--
Tim Wilson
..NET Compact Framework MVP

[quoted text, click to view]

AddThis Social Bookmark Button