Control.Padding Control.Padding Control.Padding Control.Padding Property

定义

获取或设置控件内的空白。Gets or sets padding within the control.

public:
 property System::Windows::Forms::Padding Padding { System::Windows::Forms::Padding get(); void set(System::Windows::Forms::Padding value); };
public System.Windows.Forms.Padding Padding { get; set; }
member this.Padding : System.Windows.Forms.Padding with get, set
Public Property Padding As Padding

属性值

表示控件的内部间距特征的 PaddingA Padding representing the control's internal spacing characteristics.

注解

对于GroupBoxTabControl等容器, Padding属性获取或设置其各自DisplayRectangle的属性。For containers such as GroupBox and TabControl, the Padding property gets or sets their respective DisplayRectangle properties. 属性等于其Control.Padding属性。 ScrollableControl.DockPaddingThe ScrollableControl.DockPadding property is equal to its Control.Padding property.

控件接收Padding的默认值相当接近 Windows 用户界面准则。Controls receive default values for Padding that are reasonably close to Windows user interface guidelines. 有些调整对于特定的应用程序可能仍然是必需的。Some adjustments might still be necessary for particular applications.

Padding当为GetPreferredSize时,AutoSize所有实现的控件都按数量放大。 trueAll controls that implement GetPreferredSize are enlarged by the amount in Padding when AutoSize is true.

以下控件不使用PaddingThe following controls do not use Padding:

适用于