ParentControlDesigner.CreateToolCore 方法

定義

重要

此 API 不符合 CLS 規範。

提供所有 CreateTool(ToolboxItem) 方法的核心功能。

protected:
 virtual cli::array <System::ComponentModel::IComponent ^> ^ CreateToolCore(System::Drawing::Design::ToolboxItem ^ tool, int x, int y, int width, int height, bool hasLocation, bool hasSize);
protected virtual System.ComponentModel.IComponent[] CreateToolCore (System.Drawing.Design.ToolboxItem tool, int x, int y, int width, int height, bool hasLocation, bool hasSize);
[System.CLSCompliant(false)]
protected virtual System.ComponentModel.IComponent[] CreateToolCore (System.Drawing.Design.ToolboxItem tool, int x, int y, int width, int height, bool hasLocation, bool hasSize);
abstract member CreateToolCore : System.Drawing.Design.ToolboxItem * int * int * int * int * bool * bool -> System.ComponentModel.IComponent[]
override this.CreateToolCore : System.Drawing.Design.ToolboxItem * int * int * int * int * bool * bool -> System.ComponentModel.IComponent[]
[<System.CLSCompliant(false)>]
abstract member CreateToolCore : System.Drawing.Design.ToolboxItem * int * int * int * int * bool * bool -> System.ComponentModel.IComponent[]
override this.CreateToolCore : System.Drawing.Design.ToolboxItem * int * int * int * int * bool * bool -> System.ComponentModel.IComponent[]
Protected Overridable Function CreateToolCore (tool As ToolboxItem, x As Integer, y As Integer, width As Integer, height As Integer, hasLocation As Boolean, hasSize As Boolean) As IComponent()

參數

tool
ToolboxItem

用來建立元件的 ToolboxItem

x
Int32

如果指定了大小,則為工具左邊緣位置的水平位置 (以設計階段檢視座標表示);如果未指定大小,則為工具中心的水平位置。

y
Int32

如果指定了大小,則為工具上邊緣位置的垂直位置 (以設計階段檢視座標表示);如果未指定大小,則為工具中心的垂直位置。

width
Int32

工具的寬度。 如果 hasSize 參數設定為 false,會忽略這個參數。

height
Int32

工具的高度。 如果 hasSize 參數設定為 false,會忽略這個參數。

hasLocation
Boolean

如果指定了元件的位置,則為 true;如果元件要放置在目前選取的控制項的中央,則為 false

hasSize
Boolean

如果指定了元件的大小,則為 true;如果要使用元件的預設高度和寬度值,則為 false

傳回

利用工具建立的元件陣列。

屬性

備註

這是唯一 CreateTool 可以覆寫的方法。

適用於

另請參閱