MenuBuilder GetMenuItem Method (String)CleanCode C# Libraries v1.2.03 API
Gets a menu item unique in the entire menu tree.

Namespace: CleanCode.Forms
Assembly: CleanCode (in CleanCode.dll) Version: (1.2.03)

public ToolStripMenuItem GetMenuItem(
	string displayText


Type: OnlineSystem String
The text of the menu item, which must be unique within the menu tree.

Return Value

A menu item containing the given text.

This method provides a convenience mechanism for menu items that are unique. The MenuBuilder class automatically keeps track of these so this context-free accessor may be used to retrieve a menu item. Use GetMenuItem(String, String) for non-unique menu items.
See Also