This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: "Text box" – news · newspapers · books · scholar · JSTOR (February 2017) (Learn how and when to remove this message)
A text entry box
A multi-line "textarea" text box in a web browser

A text box[a] is a control element of a graphical user interface, that should enable the user to input text information to be used by a program.[1][2] Human Interface Guidelines recommend a single-line text box when only one line of input is required, and a multi-line text box only if more than one line of input may be required. Non-editable text boxes can serve the purpose of simply displaying text.

A typical text box is a rectangle of any size, possibly with a border that separates the text box from the rest of the interface. Text boxes may contain zero, one, or two scrollbars. Text boxes usually display a text cursor (commonly a blinking vertical line), indicating the current region of text being edited. It is common for the mouse cursor to change its shape when it hovers over a text box.

Standard functionality

Typical implementations allow a user to do the following. (The keys indicated relate to the text box widgets in Microsoft Windows and Mac OS X; similar if not identical keyboard bindings exist under the X Window System and other systems, and typically follow the same scheme as Windows.)

Enter text

When keys are pressed on a keyboard, the text appears where the caret is. Some very simple text boxes may not show a caret, which would suggest that new characters typed in will appear at the end of the current text.

Navigate and manipulate text

Using a mouse:

Using the keyboard:

Edit text

Work in insert or overwrite mode, typically switched using Insert key. In insert mode if there is a character to the right of the caret, the new character will be inserted before it, while in overwrite mode typing a new character will replace (overwrite) the character to the right of the caret position.

Typing in a text while some part of the text already entered is selected will replace the selected text.

Delete / Backspace keys remove one character right / left of current caret position, while pressing them together with the Ctrl or command key removes one word.

Edit the text using standard clipboard operations.

Edits can be undone and redone with Ctrl+Z / Ctrl+Y (Windows) or command-Z / command-shift-Z (Mac OS)

References and notes

  1. ^ Also called an input box, text field or text entry box.
  1. ^ "What does text box mean?". www.definitions.net. Retrieved 2020-08-08.
  2. ^ "Text Box Definition". techterms.com. Retrieved 2020-08-08.