Export (0) Print
Expand All

TreeView.ShowNodeToolTips Property

Gets or sets a value indicating ToolTips are shown when the mouse pointer hovers over a TreeNode.

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

public bool ShowNodeToolTips { get; set; }

Property Value

Type: System.Boolean
true if ToolTips are shown when the mouse pointer hovers over a TreeNode; otherwise, false. The default is false.

In order for ToolTips to be visible, you must set the ToolTipText for a TreeNode.

The following code example demonstrates how to use the ToolTipText and ShowNodeToolTips properties. To run this example, paste the following code into a Windows Form and call InitializeTreeViewWithToolTips from the form's constructor or Load event handler.

TreeView treeViewWithToolTips;
private void InitializeTreeViewWithToolTips()
{
    treeViewWithToolTips = new TreeView();
    TreeNode node1 = new TreeNode("Node1");
    node1.ToolTipText = "Help for Node1";
    TreeNode node2 = new TreeNode("Node2");
    node2.ToolTipText = "A Tip for Node2";
    treeViewWithToolTips.Nodes.AddRange(new TreeNode[] { node1, node2 });
    treeViewWithToolTips.ShowNodeToolTips = true;
    this.Controls.Add(treeViewWithToolTips);

}

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft