語言

TextBoxBase.SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified) 方法

定義

設定控制的指定界限 TextBoxBase 。

protected:
 override void SetBoundsCore(int x, int y, int width, int height, System::Windows::Forms::BoundsSpecified specified);
protected override void SetBoundsCore(int x, int y, int width, int height, System.Windows.Forms.BoundsSpecified specified);
override this.SetBoundsCore : int * int * int * int * System.Windows.Forms.BoundsSpecified -> unit
Protected Overrides Sub SetBoundsCore (x As Integer, y As Integer, width As Integer, height As Integer, specified As BoundsSpecified)

參數

x
Int32

Left控制的新財產價值。

y
Int32

Top控制的新財產價值。

width
Int32

Width控制的新財產價值。

height
Int32

未使用。

specified
BoundsSpecified

這是數值的位元組合 BoundsSpecified 。

備註

TextBoxBase控制項使用 該PreferredHeight性質設定界限,若該AutoSize性質為 trueMultiline 且 為 false。

通常,對應於未包含在 specified 參數範圍內的參數會以目前的值傳遞。 例如,Height屬性的 、 Width或 X 屬性YLocation可以參考當前控制項實例。 然而,所有輸入的數值都會被尊重並套用到控制權上。

參數 specified 代表你的應用程式所更改的控制項 Bounds 元素。 例如,若你改變控制項的參數 Size 值, specified 參數值即為 Size 的 BoundsSpecified值。 然而,若根據所設定Size的性質調整 Dock ,specified參數值即為 None 的BoundsSpecified值。

給繼承者的注意事項

在導出類別中覆 SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified) 寫時,務必呼叫基底類別的方法 SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified) ,強制改變控制項的界限。 導出類別可以為方法增加大小限制 SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified) 。

適用於