Saturday, October 4, 2008

Separator Line on Form in C#

This example shows how to create a bevel line in Windows Forms. This line can be used as a visual separator of controls on a form.

Bevel line

To simulate the line in Windows Forms use a Label control. Set its Height to 2 pixels and BorderStyle to Fixed3D. Thats all, see the example.

// separator bevel line
label1.AutoSize = false;
label1.Height = 2;
label1.BorderStyle = BorderStyle.Fixed3D;


resource from http://www.csharp-examples.net/

0 comments: