Defines a simple text area to display a read-only value.
The LABEL form item defines a read-only text area.
A LABEL form item can be defined as a form field image or as a static label. Use a form field label when the text changes often during program execution (for example, to display text from the database). Use a static label if the text remains the same during program execution.
Some front-ends support different presentation and behavior options, which can be controlled by a STYLE attribute. For more details, see Common style attributes and Label style attributes.
Use a form field label item to display values that change often during program execution, for example if the text is stored in the database.
The label text is defined by the value of the field.
The value can be changed from the program by using the DISPLAY BY NAME / DISPLAY TO instruction, or just by changing the value of the program variable bound to the label field when using the UNBUFFERED mode in an interactive instruction.
When defining the LABEL item in the form, use a field name to identify the element in programs:
-- Grid-based layout (ATTRIBUTES item definition) LABEL f001 = cars.description; -- Stack-based layout (STACK item) LABEL cars.description;
Use a static label item to display a text that does not change during program execution.
This kind of item is not affected by instructions such as CLEAR FORM or the DISPLAY TO instruction.
-- Grid-based layout (ATTRIBUTES item definition) LABEL lab1: label1, TEXT="Name:"; -- Stack-based layout (STACK item) LABEL label1, TEXT="Name:";
LABEL ... TEXT = %"label.customer.name";
Static labels display only character text values, and therefore do not follow any justification rule as form field labels.
LABEL lab1: label1, TEXT="First line.\nSecond line.";