TreeView::NodeMouseClick Event


Occurs when the user clicks a TreeNode with the mouse.

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

event TreeNodeMouseClickEventHandler^ NodeMouseClick {
	void add(TreeNodeMouseClickEventHandler^ value);
	void remove(TreeNodeMouseClickEventHandler^ value);

This event occurs when the user clicks any part of a tree node with the mouse, including the plus sign (+) or minus sign (-) that indicates whether the node is collapsed or expanded.

For more information about how to handle events, see Handling and Raising Events.

The following code example demonstrates how to handle the NodeMouseClick event.

    void InitialTreeView_NodeMouseClick(Object^ sender,
        TreeNodeMouseClickEventArgs^ e)
        displayNodes->Text = e->Node->Text;

.NET Framework
Available since 2.0
Return to top