ParentControlDesigner.CreateToolCore Method

Definition

Important

This API is not CLS-compliant.

Provides core functionality for all the CreateTool(ToolboxItem) methods.

C#
protected virtual System.ComponentModel.IComponent[] CreateToolCore(System.Drawing.Design.ToolboxItem tool, int x, int y, int width, int height, bool hasLocation, bool hasSize);
C#
[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);

Parameters

tool
ToolboxItem

The ToolboxItem to create a component from.

x
Int32

The horizontal position, in design-time view coordinates, of the location of the left edge of the tool, if a size is specified; the horizontal position of the center of the tool, if no size is specified.

y
Int32

The vertical position, in design-time view coordinates, of the location of the top edge of the tool, if a size is specified; the vertical position of the center of the tool, if no size is specified.

width
Int32

The width of the tool. This parameter is ignored if the hasSize parameter is set to false.

height
Int32

The height of the tool. This parameter is ignored if the hasSize parameter is set to false.

hasLocation
Boolean

true if a location for the component is specified; false if the component is to be positioned in the center of the currently selected control.

hasSize
Boolean

true if a size for the component is specified; false if the default height and width values for the component are to be used.

Returns

An array of components created from the tool.

Attributes

Remarks

This is the only CreateTool method that can be overridden.

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

See also