TreeNode.BackColor Property

 

Gets or sets the background color of the tree node.

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

member BackColor : Color with get, set

Property Value

Type: System.Drawing.Color

The background Color of the tree node. The default is Color.Empty.

If the BackColor property is set to Color.Empty, the Color used is the BackColor property value of the TreeView control that the tree node is assigned to.

The following code example highlights any TreeNode objects a TreeView control that has its Checked property set to true by setting its BackColor property to Yellow. This code requires that you have a TreeView control on a Form with a collection of TreeNode objects.

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

.NET Framework
Available since 1.1
Return to top
Show: