ErrorProvider.GetIconPadding(Control) 方法

定义

返回在错误图标旁边留下的额外空间量。

public:
 int GetIconPadding(System::Windows::Forms::Control ^ control);
public int GetIconPadding(System.Windows.Forms.Control control);
member this.GetIconPadding : System.Windows.Forms.Control -> int
Public Function GetIconPadding (control As Control) As Integer

参数

control
Control

要为其获取填充的控件。

返回

在图标和控件之间保留的像素数。

例外

controlnull

注解

许多图标通常在其中心图像周围具有额外的空间,因此仅当需要额外的空间时,填充值才是必需的。 填充值可以是正值或负值。 负值导致图标与控件边缘重叠。 默认图标填充为 0。

适用于

另请参阅