JUSTIFY attribute
The JUSTIFY
attribute defines the alignment of a text field content,
and table column headers.
Syntax
JUSTIFY = { LEFT | CENTER | RIGHT }
Usage
With the JUSTIFY
attribute, you specify the justification of the content of a
text field as LEFT
, CENTER
or RIGHT
when the
field is in display state.
JUSTIFY
has no effect on the content of form item types like
IMAGE
, CHECKBOX
, PROGRESSBAR
. It aligns only the
content of text fields such as EDIT
and BUTTONEDIT
. However, the
JUSTIFY
attribute can be used with all form item types: In addition to the text
field data alignment, JUSTIFY
defines the alignment of table column headers (this
means table column header follows the alignment of field data). However, column header alignment in
tables may not be enabled by default; check the headerAlignment
presentation style attribute for the Table class.
Depending on the front-end type, JUSTIFY
may not be supported, if the native
platform widget does not allow alignment. For example, a DATEEDIT
form field may
not align the date value. The JUSTIFY
attribute is typically used for text data
only.
If the field has the focus in a dialog allowing user input, the data alignment rules are
front-end specific, and follow either JUSTIFY
or the data type of the field
variable. When the current dialog is a CONSTRUCT
, criteria input is always left-aligned.
With mobile front-ends, tables are rendered as list views with a maximum of two visible columns.
By default, the main and the comment columns are displayed vertically in each row (main is above the
comment). Use JUSTIFY=RIGHT
for the second column, in order to display columns side
by side. Note that numeric fields are by default right justified and thus do not need this attribute
to be set.
You can also specify the text alignment of static form labels with the JUSTIFY
attribute.
Example
LABEL t01: TEXT="Hello!", JUSTIFY=RIGHT;
EDIT f01 = order.value, JUSTIFY=CENTER;