ListViewArray.BeforeLabelEdit Event

Definition

Occurs when the user starts editing the label of an item.

public:
 event System::Windows::Forms::LabelEditEventHandler ^ BeforeLabelEdit;
public event System.Windows.Forms.LabelEditEventHandler BeforeLabelEdit;
member this.BeforeLabelEdit : System.Windows.Forms.LabelEditEventHandler 
Public Custom Event BeforeLabelEdit As LabelEditEventHandler 
Public Event BeforeLabelEdit As LabelEditEventHandler 

Event Type

Remarks

The BeforeLabelEdit event occurs when the user starts modifying the text for an item. If the event handler cancels this event, the user cannot change the text. You can use this event to prevent the user from editing specific items in the ListView control. If the LabelEdit property of the ListView control is set to false, the BeforeLabelEdit event is not raised; all user attempts to change item labels are automatically rejected.

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

Note

Functions and objects in the Microsoft.VisualBasic.Compatibility.VB6 namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation.

Applies to