Text Boxes 

A text box (sometimes called an edit control) is a rectangular control in which the user types (or pastes) text to interact with the computer. A text box can be defined to support single or multiple lines of text. Unlike text in a static text field, text in an active text box can be edited, selected, and copied.

Common types of text boxes

Characteristics Common Uses Examples

Single-line, editable

Entering short strings

Art Image

Multiple-line, editable

Entering lengthy strings

Art Image

Multiple-line, read-only

Displaying EULAs, wizard summaries, event logs, and other types of lengthy material for the user to read

Art Image

Single-line, read-only

Displaying text that the user might want to copy or horizontally scroll (the size of the text might exceed the allotted space)

Art Image

Rich text, read-only

Displaying embedded objects and links

Art Image

Rich text, editable

Entering strings with font and format properties

Art Image

In addition, you can support auto-exit for text boxes if they are defined for fixed-length input; that is, as soon as the last character is typed in the text box, the focus moves to the next control. For example, you can define a 5-character auto-exit text box to facilitate entering part of a product key, or you can create a three 2-character auto-exit text boxes to support entering a date.

In list boxes and spin boxes, text boxes are combined with other controls.

See Also

Concepts

Access Keys
Labels
Layout Specifications: Win32
Layout Specifications: Windows Forms
List Boxes
Spin Boxes
Subordination
Text Fields