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 值的位元組合。

備註

如果 AutoSize 屬性為 trueMultiline 屬性為 false ,則 TextBoxBase 控制項會 PreferredHeight 使用 屬性來設定界限。

一般而言,對應至參數中未包含 specified 之界限的參數會以其目前值傳入。 例如, Height 屬性的 、 Width 或 或 X Y 屬性 Location 可以使用控制項目前實例的參考傳入。 不過,傳入的所有值都會接受並套用至 控制項。

參數 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) 方法。

適用於