TreeView.ShowLines Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets a value indicating whether lines are drawn between tree nodes in the tree view control.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

member ShowLines : bool with get, set

Property Value

Type: System.Boolean

true if lines are drawn between tree nodes in the tree view control; otherwise, false. The default is true.

If ShowLines is set to true, the FullRowSelect property is ignored.

The following code example illustrates a customized TreeView. By inheriting the TreeView class, this custom version has all the functionality of a typical TreeView. Changing various property values in the constructor provides a unique appearance. Because the ShowPlusMinus property is set to false, the customized control also overrides the OnAfterSelect method so that nodes can be expanded and collapsed when they are clicked.

A control that is customized in this way can be used throughout an organization, making it easy to provide a consistent interface without requiring the control properties to be specified in each individual project.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: