Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)
Serves as the default hash function. (Inherited from Object.)
Returns a string that represents the current object.(Inherited from Object.)
The AfterLabelEdit event occurs when the user finishes editing the text for a tree node. The BeforeLabelEdit event occurs when the user begins editing the text for a tree node. A object specifies the new text to associate with the tree node, the tree node that contains the label to edit, and whether the edit operation has been canceled.
For more information about handling events, see Handling and Raising Events.
The following example allows the user to edit nonroot tree nodes by using a ContextMenu. When the user right clicks the mouse, the TreeNode at that position is determined and stored in a variable named mySelectedNode. If a nonroot tree node was selected, it is put into an editable state, allowing the user to edit the node label. After the user stops editing the tree node label, the new label text is evaluated and saved. For this example, several characters are considered not valid in the label text. If one of the invalid characters is in the label string, or the string is empty, the user is notified of the error and the label is returned to its previous text.
Available since 1.1
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.