System.Windows.Forms.Design.ParentControlDesigner.CreateTool Method

Creates a component or control from the specified tool and adds it to the current design document.

Syntax

protected void CreateTool (System.Drawing.Design.ToolboxItem tool)

Parameters

tool
The System.Drawing.Design.ToolboxItem to create a component from.

Remarks

The new component or control is positioned at the center of the currently selected control. This method uses the default size for the tool, if the tool has a default size specified.

To specify a location or location and size for the component or control, use one of the other overloaded ParentControlDesigner.CreateTool(System.Drawing.Design.ToolboxItem) methods.

Requirements

Namespace: System.Windows.Forms.Design
Assembly: System.Design (in System.Design.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0