Form file structure / ATTRIBUTES section |
The LABEL item type defines a simple text area to display a read-only value.
Figure 1. LABEL item type
LABEL item-tag = field-name [ , attribute-list ] ;
LABEL item-tag: item-name [ , attribute-list ] ;
COLOR, COLOR WHERE, COMMENT, FONTPITCH, HIDDEN, IMAGECOLUMN, JUSTIFY, REVERSE, SAMPLE, SIZEPOLICY, STYLE, TAG.
Form field label only: FORMAT, SAMPLE.
Static label only: TEXT.
Table column only: UNSORTABLE, UNSIZABLE, UNHIDABLE, UNMOVABLE, TITLE.
The LABEL form item type can be used to define a read-only text area as a form field or as a static label.
Some front-ends support different presentation options which can be controlled by a style attribute. You can for example change the text format to render HTML content.
This type of label item must be used to display values that change often during program execution, like database information. The text of the label is defined by the value of the corresponding form field. The text can be changed from the program by using the DISPLAY TO instruction to set the value of the field, or within a list by using a DISPLAY ARRAY. This kind of Form Item does not allow data entry; it is only used to display values.
This type of label item must be used to display text that does not change often, like field descriptions. The text of the label is defined by the TEXT attribute; the item is not a form field. The text can be changed from the program by using the API provided to manipulate the user interface (see Dynamic User Interface for more details). It is not possible to change the text with a DISPLAY TO instruction. This kind of item is not affected by instructions such as CLEAR FORM. Static labels display only character text values, and therefore do not follow any justification rule as form field labels.
LABEL f001 = vehicle.description; -- This is a form field label LABEL lab1: label1, TEXT="Hello"; -- This is a static label