ColumnWidthChangingEventArgs Constructors

Definition

Initializes a new instance of the ColumnWidthChangingEventArgs class.

Overloads

ColumnWidthChangingEventArgs(Int32, Int32)

Initializes a new instance of the ColumnWidthChangingEventArgs class with the specified column index and width.

ColumnWidthChangingEventArgs(Int32, Int32, Boolean)

Initializes a new instance of the ColumnWidthChangingEventArgs class, specifying the column index and width and whether to cancel the event.

ColumnWidthChangingEventArgs(Int32, Int32)

Source:
ColumnWidthChangingEventArgs.cs
Source:
ColumnWidthChangingEventArgs.cs
Source:
ColumnWidthChangingEventArgs.cs

Initializes a new instance of the ColumnWidthChangingEventArgs class with the specified column index and width.

C#
public ColumnWidthChangingEventArgs(int columnIndex, int newWidth);

Parameters

columnIndex
Int32

The index of the column whose width is changing.

newWidth
Int32

The new width for the column.

Applies to

.NET Framework 4.8.1 och andra versioner
Produkt Versioner
.NET Framework 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

ColumnWidthChangingEventArgs(Int32, Int32, Boolean)

Source:
ColumnWidthChangingEventArgs.cs
Source:
ColumnWidthChangingEventArgs.cs
Source:
ColumnWidthChangingEventArgs.cs

Initializes a new instance of the ColumnWidthChangingEventArgs class, specifying the column index and width and whether to cancel the event.

C#
public ColumnWidthChangingEventArgs(int columnIndex, int newWidth, bool cancel);

Parameters

columnIndex
Int32

The index of the column whose width is changing.

newWidth
Int32

The new width of the column.

cancel
Boolean

true to cancel the width change; otherwise, false.

Remarks

Passing in true for the cancel parameter will cause the width change to be canceled, and the column will return to its previous size.

Applies to

.NET Framework 4.8.1 och andra versioner
Produkt Versioner
.NET Framework 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