Click or drag to resize

GH_DocumentObjectMenu_MoveItem Method (ToolStripItem, Boolean, String)

Utility function for moving menu items.

Namespace:  Grasshopper.Kernel
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
public static bool Menu_MoveItem(
	ToolStripItem item,
	bool insertBelow,
	params string[] targets
)

Parameters

item
Type: System.Windows.FormsToolStripItem
Item to move, it must already be part of the dropdown menu.
insertBelow
Type: SystemBoolean
If true, the item will be inserted below the match, if false, above the match.
targets
Type: SystemString
Names of move to targets, the item will be inserted next to the first name, if that fails the second, etc. etc.

Return Value

Type: Boolean
True on success, false on failure.
See Also