This documentation is archived and is not being maintained.

ErrorProvider.GetIconPadding Method

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

[Visual Basic]
Public Function GetIconPadding( _
   ByVal control As Control _
) As Integer
public int GetIconPadding(
 Control control
public: int GetIconPadding(
 Control* control
public function GetIconPadding(
   control : Control
) : int;


The control to get the padding for.

Return Value

The number of pixels to leave between the icon and the control. Many icons normally 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.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

ErrorProvider Class | ErrorProvider Members | System.Windows.Forms Namespace | SetIconPadding