Click or drag to resize

GH_DocumentObjectMenu_AppendTextItem Method (ToolStripDropDown, String, GH_MenuTextBoxKeyDownEventHandler, GH_MenuTextBoxTextChangedEventHandler, Boolean, Int32, Boolean)

Utility function for inserting text boxes into menus.

Namespace:  Grasshopper.Kernel
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
public static ToolStripTextBox Menu_AppendTextItem(
	ToolStripDropDown menu,
	string text,
	GH_MenuTextBoxKeyDownEventHandler keydown,
	GH_MenuTextBoxTextChangedEventHandler textchanged,
	bool enabled,
	int width,
	bool lockOnFocus
)

Parameters

menu
Type: System.Windows.FormsToolStripDropDown
Menu to add a textbox to.
text
Type: SystemString
Content of textbox.
keydown
Type: Grasshopper.GUIGH_MenuTextBoxKeyDownEventHandler
Delegate for the KeyDown event.
textchanged
Type: Grasshopper.GUIGH_MenuTextBoxTextChangedEventHandler
Delegate for the TextChanged event.
enabled
Type: SystemBoolean
If true, the textbox will be enabled.
width
Type: SystemInt32
If larger than zero, we'll do our very best to grow the menu to the given width. No guarantees.
lockOnFocus
Type: SystemBoolean
If true, then a GotFocus event will lock the other menu items.

Return Value

Type: ToolStripTextBox
The appended text box item.
See Also