GH_DocumentObject.Menu_AppendItem Method (ToolStrip, String, EventHandler, Image, Object)

GH_DocumentObjectMenu_AppendItem Method (ToolStrip, String, EventHandler, Image, Object)

Utility function for appending generic menu items.

Namespace:  Grasshopper.Kernel
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
public static ToolStripMenuItem Menu_AppendItem(
	ToolStrip menu,
	string text,
	EventHandler click,
	Image icon,
	Object tag
)
Public Shared Function Menu_AppendItem ( 
	menu As ToolStrip,
	text As String,
	click As EventHandler,
	icon As Image,
	tag As Object
) As ToolStripMenuItem

Parameters

menu
Type: System.Windows.FormsToolStrip
Menu to append item to.
text
Type: SystemString
Item text.
click
Type: SystemEventHandler
Delegate that handles click events. If nothing, the click event will not be handled.
icon
Type: System.DrawingImage
Item icon, or null for no icon.
tag
Type: SystemObject
Tag to assign to menu item.

Return Value

Type: ToolStripMenuItem
The appended item
See Also