Click or drag to resize

GH_DocumentObjectMenu_AppendCustomItem Method (ToolStripDropDown, Control, GH_MenuCustomControlKeyDownEventHandler, Boolean, Int32, Boolean)

Utility function for inserting exotic controls into dropdown menus.

Namespace:  Grasshopper.Kernel
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
public static bool Menu_AppendCustomItem(
	ToolStripDropDown menu,
	Control control,
	KeyDownEventHandler keydown,
	bool enabled,
	int width,
	bool lockOnFocus
)

Parameters

menu
Type: System.Windows.FormsToolStripDropDown
Dropdown to add a control to.
control
Type: System.Windows.FormsControl
Control to insert.
keydown
Type: KeyDownEventHandler
Delegate for key-presses.
enabled
Type: SystemBoolean
If true, the control will be enabled.
width
Type: SystemInt32
Width hint for the control.
lockOnFocus
Type: SystemBoolean
If true and the control gets focus, the rest of the menu will be locked.

Return Value

Type: Boolean
See Also