InsertToolPart(Int32, Microsoft.SharePoint.WebPartPages.ToolPart) Method
The InsertToolPart method of the ToolPane class adds the specified ToolPart to the tool pane.
Parameters
index The position of the tool part among the existing tool parts. If the specified position exceeds the number of tool parts already in the list, the tool part will be added at the end.
tp A Microsoft.SharePoint.WebPartPages.ToolPart object that represents the tool part to be added to the tool pane.
Remarks
The InsertToolPart method can be used in the CreateToolPaneControls method of the ICustomizeToolPane interface in a Web Part that customizes the tool pane, to insert custom or standard tool parts into the tool pane in the desired order.
Example
The following code example demonstrates the use of the InsertToolPart method to insert a custom tool part, ToolPart1
, into the tool pane, tp
, followed by the standard tool parts.
Requirements
Platforms: Microsoft Windows Server 2003
Security: Code Access Security
Related Topics
RemoveToolPart(Microsoft.SharePoint.WebPartPages.ToolPart) Method