Common Properties

TITLE

Labels can take titles. The text of the title is the text displayed on the screen. The TITLE phrase is used to specify a title. A key letter may be specified in the title. See the entry for TITLE Phrase in Common Screen Options in the ACUCOBOL-GT Reference Manual for more information.

VALUE

Labels cannot be activated and do not take values.

SIZE

Labels define their height by multiplying the LINES value by the height of the label's font (including any interline spacing). For example, a LINES value of 1 indicates one line of text. Labels define their width by multiplying the SIZE value by the width of the zero character of the label's font.

When the program executes on a non-graphical system, the values specified in the CLINES and CSIZE phrases, if present, replace the values specified by the LINES and SIZE phrases.

The default value of LINES is 1. The default value of SIZE is computed by measuring the length of the label's title using the label's font and dividing by the width of the zero character. Thus, the default width of a label exactly occupies the space its text takes up on the screen.

To get a multiline label, set the LINES value to the number of lines wanted and the SIZE value to the desired width. SIZE specifies the width that each line of the label will occupy

COLOR

Labels use both the foreground and background colors specified. If either is omitted, the corresponding color of the label's owning subwindow is used.

If you are using the WIN32_NATIVECTLS runtime variable to automatically enable Windows control styles, label background colors may exhibit a darker background when residing on frames or tab frames. This is because some Windows label controls have a different background color than frames or tab frames. Making labels have the TRANSPARENT property resolves this issue.

ATW-CSS-CLASS

This property enables you to apply CSS styles to the control when the program is run through AcuToWeb. The value of ATW-CSS-CLASS should represent a corresponding class in the current theme (that is, a .class-name entry in the cascading style sheet) deployed when you run your program through AcuToWeb. This property can be applied to more than one control in your program.

If both the ATW-CSS-CLASS and ATW-CSS-ID properties are specified for this control, and both correspond to the same style in the style sheet, the style specified by ATW-CSS-ID takes precedence.

See Cascading Style Sheet Syntax for more information about additional in-built styles in AcuToWeb.

ATW-CSS-ID

This property enables you to apply CSS styles to the control when the program is run through AcuToWeb. The value of ATW-CSS-ID should represent a corresponding ID in the current theme (that is, a #class-name entry in the cascading style sheet) deployed when you run your program through AcuToWeb. The value of this property must be unique, and only applied to one control in your program.

If both the ATW-CSS-CLASS and ATW-CSS-ID properties are specified for this control, and both correspond to the same style in the style sheet, the style specified by ATW-CSS-ID takes precedence.

See Cascading Style Sheet Syntax for more information about additional in-built styles in AcuToWeb.

STYLES

LEFT This alignment style causes the label’s text to be left-aligned in its region. By default, the label text is not justified.

When LEFT, RIGHT, or CENTER is specified at the time the label is created, the label's text is stripped of leading and trailing spaces before the default size is computed.

RIGHT This style causes the label's text to be right-aligned in its region. This will appear no differently from LEFT if the SIZE of the label does not provide any extra space for the label's text.
CENTER, CENTERED This style causes the label's text to be centered in its region. This will appear no differently from LEFT if the SIZE of the label does not provide any extra space for the label's text.
NO-KEY-LETTER This style suppresses the interpretation of "&" as a key prefix. This is useful in cases in which you are assigning user-entered data to a label and want to allow values that include the ampersand ("&") character (such as "AT&T").
TRANSPARENT This style makes a label's background invisible, so that anything underneath the label shows through. TRANSPARENT is useful if you want to display a label that blends into a background having more than one color. It is also useful when labels appear on frames or tab frames and you are using the WIN32_NATIVECTLS runtime variable to automatically enable certain Windows control styles. In this case the label may have a darker background than the frame. Making the label transparent resolves this issue.