ToolStripItemCollection::Find Method (String^, Boolean)
.NET Framework (current version)
Searches for items by their name and returns an array of all matching controls.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
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
Available since 2.0
Show: