Add a Label to your form to identify the name of a control or group of controls. A Label can optionally be bound to an attribute.
Note: When a Label is added to a form that has the identity of a Report Frame, the Label properties are different. Refer to Label Properties in Report Frames for more information on these properties.
Labels are of two types: Static and Dynamic.
Static Labels are directly typed on the form in the Painter tab or created with a drag and drop operation from the Toolbox (these labels are not associate with any attribute).
Dynamic Labels are labels whose ControlType is changed to Label from another control that was associated with an attribute. If the control is associated with an Attribute, then deleting the attribute results in deleting the related presentation on the Painter.
When a Label is added to a form that has the identity of a Fixed screen, the Label properties are different. Refer to Label Object Properties in Fixed Screens for more information on these properties.
Property |
Function |
---|---|
Id | Read-only. By default, automatically generated. Id="Label1" for the first inserted Label, Id="Label2" for the second, and so on. |
Name | Read-only. The value of this property is set to Static control. |
BackgroundColor | Specifies a background color for the object. Select a color from one of the tabs in the drop-down list. Note that you can specify a custom color. If you change this value, you can restore the default value specified for the parent object by right-clicking the property and clicking Reset on the context menu. |
BorderStyle | Specifies options to control the border of the container that surrounds the object. The following options are available:
|
ControlType | Specifies Label as the type of object added to the form. To change the ControlType, choose from the list of available types. |
Font | Specifies font attributes that are applied directly to the text appearing in the object. If you change this value, you can restore the default value specified for the parent object by right-clicking the property and clicking Reset on the context menu. |
Foreground Color | Specifies a foreground color for the object. Select a color from one of the tabs in the drop-down list. Note that you can specify a custom color. If you change this value, you can restore to the default value specified for the parent object by right-clicking the property and clicking Reset on the context menu. |
Location | Specifies the point in pixels that represents the upper-left corner of the object relative to the upper-left corner of its container as an X and Y location. |
(Name) | Specifies an attribute to which the object can be bound, though a label can exist without an attribute assignment. This property is read-only from within the Painter document window, though it can be renamed from any other window that displays existing attributes. |
Size | Specifies the size of the object representing the height and width in pixels. |
TabIndex | Specifies the index that defines the tab order for the object. If the label contains a shortcut key definition (a character preceded by the “&” character), then you should set the TabIndex value to the same value as the TabIndex value of the field to which you want focus to go when the shortcut key is activated. |
Text | Specifies the text to be displayed in the object in the form. Note: Do not include the HTML tags (<p>, <P>, </p> and </P>) in the label text as they will be removed by the painter.Some clients, such as ASP.Net, interpret these tags as paragraph tag. If they are left on the screen, they create a new paragraph and distort the screen. |
TextAlign | Specifies whether the text in the object is left-aligned, right-aligned, centere-aligned, or justified. |
ToolTip | Specifies an optional tooltip to appear when the user at runtime hovers the mouse over a control in Winforms. To view the tooltip in the Presentation Client, the user has to hover over the control and press the F1 key. This tooltip is visible only at runtime. |
Wrap | Specifies whether the browser automatically performs word-wrap on the text of the object. |