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


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

 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. ScrollableControl.DockPadding属性等于其Control.Padding属性。The 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.

实现的所有控件GetPreferredSize的量以放大PaddingAutoSizetrueAll controls that implement GetPreferredSize are enlarged by the amount in Padding when AutoSize is true.

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