ParentControlDesigner.CreateToolCore Method (ToolboxItem, Int32, Int32, Int32, Int32, Boolean, Boolean)

 

Provides core functionality for all the CreateTool methods.

Namespace:   System.Windows.Forms.Design
Assembly:  System.Design (in System.Design.dll)

protected virtual IComponent[] CreateToolCore(
	ToolboxItem tool,
	int x,
	int y,
	int width,
	int height,
	bool hasLocation,
	bool hasSize
)

Parameters

tool
Type: System.Drawing.Design.ToolboxItem

The ToolboxItem to create a component from.

x
Type: System.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
Type: System.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
Type: System.Int32

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

height
Type: System.Int32

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

hasLocation
Type: System.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
Type: System.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.

Return Value

Type: System.ComponentModel.IComponent[]

An array of components created from the tool.

This is the only CreateTool method that can be overridden.

.NET Framework
Available since 1.1
Return to top
Show: