Control.Padding 屬性

定義

取得或設定控制項內的邊框間距。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

屬性值

Padding,表示控制項的內部間距特性。A 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.

控制項會接收相當接近 Windows 使用者介面方針之 Padding 的預設值。Controls receive default values for Padding that are reasonably close to Windows user interface guidelines. 某些特定應用程式可能仍需要進行一些調整。Some adjustments might still be necessary for particular applications.

AutoSize true 時,所有實 GetPreferredSize 的控制項都會以 Padding 的數量來放大。All controls that implement GetPreferredSize are enlarged by the amount in Padding when AutoSize is true.

下列控制項不會使用 PaddingThe following controls do not use Padding:

適用於