Back to Devexpress

Labels

windowsforms-14625-controls-and-libraries-form-layout-managers-layout-and-data-layout-controls-other-layout-elements-labels.md

latest1.4 KB
Original Source

Labels

  • Dec 02, 2020

Labels allow you to display static text. The Layout Control provides built-in labels (SimpleLabelItem), so there is no need to use external label controls within the layout:

To add built-in labels to the layout at design time or runtime, invoke the Customization Form and drag Label items from the form to your layout.

As a result, a new label is created and displayed at the position where it is dropped. You can then move the label to a new position if necessary. To delete the label from the layout, do one of the following:

  • drag it back to the Customization Form;
  • select it and press the Delete key.

To add labels to your layout in code, create a SimpleLabelItem object, and then add it to the required layout group. See Customizing a Layout In Code for examples as well as a list of methods that can be used to add items to groups.