ToolStripManager::FindToolStrip Method (String^)

 

Finds the specified ToolStrip or a type derived from ToolStrip.

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

public:
[UIPermissionAttribute(SecurityAction::Demand, Window = UIPermissionWindow::AllWindows)]
static ToolStrip^ FindToolStrip(
	String^ toolStripName
)

Parameters

toolStripName
Type: System::String^

A string specifying the name of the ToolStrip or derived ToolStrip type to find.

Return Value

Type: System.Windows.Forms::ToolStrip^

The ToolStrip or one of its derived types as specified by the toolStripName parameter, or null if the ToolStrip is not found.

Use the FindToolStrip method to search for a ToolStrip or an object derived from ToolStrip. Derived types of ToolStrip are StatusStrip, MenuStrip, ToolStripDropDown, ToolStripDropDownMenu, and ContextMenuStrip. If the object of the search is not specifically a ToolStrip but one of these derived types, cast the return type as required.

The following code example demonstrates a use of the FindToolStrip method. This example is part of a larger example provided for the Renderer property.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: