ErrorProvider.GetIconPadding(Control) Method

Definition

Returns the amount of extra space to leave next to the error icon.

public int GetIconPadding (System.Windows.Forms.Control control);

Parameters

control
Control

The control to get the padding for.

Returns

The number of pixels to leave between the icon and the control.

Exceptions

control is null.

Remarks

Many icons typically have extra space around their central images, so the padding value is only necessary if additional space is necessary. Padding values can be positive or negative. Negative values cause the icon to overlap the edge of the control. The default icon padding is 0.

Applies to

Produit 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

See also