GH_DocumentObject.Menu_AppendTextItem Method (ToolStripDropDown, String, GH_MenuTextBox.KeyDownEventHandler, GH_MenuTextBox.TextChangedEventHandler, Boolean, Int32, Boolean)

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
)
Public Shared Function Menu_AppendTextItem ( 
	menu As ToolStripDropDown,
	text As String,
	keydown As GH_MenuTextBoxKeyDownEventHandler,
	textchanged As GH_MenuTextBoxTextChangedEventHandler,
	enabled As Boolean,
	width As Integer,
	lockOnFocus As Boolean
) As ToolStripTextBox

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