# TextInput class

Namespace: [Grasshopper2.UI.Text](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.ui.text.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public sealed class TextInput
```

A generic text input field.

## Constructors

- [TextInput](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.text.textinput/ctor.md): (2 overloads) Create a new toolbar text field.

## Properties

- [DisplayChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.text.textinput/displaychanged.md): Gets or sets the action which is invoked whenever this text field requires a redraw.
- [EnterPressed](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.text.textinput/enterpressed.md): Gets or sets the action which is invoked whenever the ENTER key is pressed.
- [EscapePressed](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.text.textinput/escapepressed.md): Gets or sets the action which is invoked whenever the ESCAPE key is pressed.
- [Focus](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.text.textinput/focus.md): Gets or sets whether this field has focus.
- [Placeholder](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.text.textinput/placeholder.md): Gets or sets the placeholder string to display when there is no text.
- [ReadOnly](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.text.textinput/readonly.md): Gets or sets whether the text in this field can be changed.
- [Text](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.text.textinput/text.md): Gets the text contained in this field.
- [TextChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.text.textinput/textchanged.md): Gets or sets the action which is invoked whenever the text of this input changes.

## Methods

- [Draw](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.text.textinput/draw.md): (2 overloads)
- [RespondToKeyDown](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.text.textinput/respondtokeydown.md)
- [RespondToMouseDown](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.text.textinput/respondtomousedown.md)
- [RespondToMouseMove](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.text.textinput/respondtomousemove.md)
- [RespondToMouseUp](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.text.textinput/respondtomouseup.md)
- [RespondToTextInput](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.text.textinput/respondtotextinput.md)
- [SetText](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.text.textinput/settext.md): (2 overloads) Set new text content.
