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
)
Public Shared Function Menu_AppendCustomItem (
menu As ToolStripDropDown,
control As Control,
keydown As KeyDownEventHandler,
enabled As Boolean,
width As Integer,
lockOnFocus As Boolean
) As Boolean
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:
BooleanSee Also