Click or drag to resize

GH_DocumentObject.Menu_AppendTextItem Method (ToolStripDropDown, String, GH_MenuTextBox.KeyDownEventHandler, GH_MenuTextBox.TextChangedEventHandler, 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_MenuTextBox.KeyDownEventHandler keydown,
	GH_MenuTextBox.TextChangedEventHandler textchanged,
	bool enabled,
	int width,
	bool lockOnFocus
)

Parameters

menu
Type: System.Windows.Forms.ToolStripDropDown
Menu to add a textbox to.
text
Type: System.String
Content of textbox.
keydown
Type: Grasshopper.GUI.GH_MenuTextBox.KeyDownEventHandler
Delegate for the KeyDown event.
textchanged
Type: Grasshopper.GUI.GH_MenuTextBox.TextChangedEventHandler
Delegate for the TextChanged event.
enabled
Type: System.Boolean
If true, the textbox will be enabled.
width
Type: System.Int32
If larger than zero, we'll do our very best to grow the menu to the given width. No guarantees.
lockOnFocus
Type: System.Boolean
If true, then a GotFocus event will lock the other menu items.

Return Value

Type: ToolStripTextBox
The appended text box item.
See Also