System.Windows.Forms.TreeView.GetNodeAt Method

Retrieves the tree node that is at the specified point.

Syntax

public TreeNode GetNodeAt (System.Drawing.Point pt)

Parameters

pt
The System.Drawing.Point to evaluate and retrieve the node from.

Returns

The System.Windows.Forms.TreeNode at the specified point, in tree view (client) coordinates, or null if there is no node at that location.

Remarks

You can pass the MouseEventArgs.X and MouseEventArgs.Y coordinates of the Control.MouseDown event as the System.Drawing.Point.X and System.Drawing.Point.Y values of a new System.Drawing.Point.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0