Label control overview (Windows Forms .NET)

Windows Forms Label controls are used to display text that cannot be edited by the user. They're used to identify objects on a form and to provide a description of what a certain control represents or does. For example, you can use labels to add descriptive captions to text boxes, list boxes, combo boxes, and so on. You can also write code that changes the text displayed by a label in response to events at run time.

Working with the Label Control

Because the Label control can't receive focus, it can be used to create access keys for other controls. An access key allows a user to focus the next control in tab order by pressing the Alt key with the chosen access key. For more information, see Use a label to focus a control.

The caption displayed in the label is contained in the Text property. The TextAlign property allows you to set the alignment of the text within the label. For more information, see How to: Set the Text Displayed by a Windows Forms Control.

See also