NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Label Control

Win Forms Label controls are used to display text and cannot be edited by the user. They are used to identify objects on a form – provide a description of what a certain control will do if clicked, for example – or at run time, they can display information in response to an event or process in your application. 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. For example, if your application takes a few minutes to process a change, you can display a processing-status message in a label.

Because the Label control cannot receive the focus, it can also be used to create access keys for other controls.

The caption displayed in the label is contained in the Text property. The Alignment property allows you to set the alignment of the text within the label control to either Left Justify (0, the default), Center (1), or Right Justify (2). For more information, see Setting the Text Displayed by a Control.

See Also

Label Class | Sizing a Label Control to Fit Its Contents | Using Labels to Create Access Keys