ToolStripItemCollection::Find Method (String^, Boolean)

 

Searches for items by their name and returns an array of all matching controls.

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

public:
array<ToolStripItem^>^ Find(
	String^ key,
	bool searchAllChildren
)

Parameters

key
Type: System::String^

The item name to search the ToolStripItemCollection for.

searchAllChildren
Type: System::Boolean

true to search child items of the ToolStripItem specified by the key parameter; otherwise, false.

Return Value

Type: array<System.Windows.Forms::ToolStripItem^>^

A ToolStripItem array of the search results.

Exception Condition
ArgumentNullException

The key parameter is null or empty.

.NET Framework
Available since 2.0
Return to top
Show: