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

屬性值

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. 屬性等於其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.

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

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

適用於