LabelEditEventArgs Constructors

Definition

Initializes a new instance of the LabelEditEventArgs class.

Overloads

LabelEditEventArgs(Int32)

Initializes a new instance of the LabelEditEventArgs class with the specified index to the ListViewItem to edit.

LabelEditEventArgs(Int32, String)

Initializes a new instance of the LabelEditEventArgs class with the specified index to the ListViewItem being edited and the new text for the label of the ListViewItem.

LabelEditEventArgs(Int32)

Source:
LabelEditEventArgs.cs
Source:
LabelEditEventArgs.cs
Source:
LabelEditEventArgs.cs

Initializes a new instance of the LabelEditEventArgs class with the specified index to the ListViewItem to edit.

C#
public LabelEditEventArgs(int item);

Parameters

item
Int32

The zero-based index of the ListViewItem, containing the label to edit.

Remarks

You can use this constructor when raising the ListView.BeforeLabelEdit or ListView.AfterLabelEdit event at run time to specify a specific list item in the ListView to edit.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

LabelEditEventArgs(Int32, String)

Source:
LabelEditEventArgs.cs
Source:
LabelEditEventArgs.cs
Source:
LabelEditEventArgs.cs

Initializes a new instance of the LabelEditEventArgs class with the specified index to the ListViewItem being edited and the new text for the label of the ListViewItem.

C#
public LabelEditEventArgs(int item, string label);
C#
public LabelEditEventArgs(int item, string? label);

Parameters

item
Int32

The zero-based index of the ListViewItem, containing the label to edit.

label
String

The new text assigned to the label of the ListViewItem.

Remarks

You can use this constructor when raising the ListView.BeforeLabelEdit or ListView.AfterLabelEdit event at run time to specify a list item in the ListView to edit. The constructor also enables you to specify the new text associated with the label of the ListViewItem.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10