2.10 .alignment
With this attribute you can define the alignment of a text.
Definition
-
Data type
integer
-
Access
get, set
-
changed event
yes

-
C
Data type: DT_integer
-
COBOL
Data type: DT-integer
-
Classification
object-specific attribute
-
Objects
Value range
- -1
- right-justified
- 0
- centered
- 1
- left-justified
The attribute determines how the text of an image object is horizontally aligned in the space available for it (default value 0).
The effect of .alignment in dependency of the attributes .spacing and .tilestyle is explained at the .tilestyle attribute.
At a notebook this attribute defines the alignment of the status text that every notepage may have (default value 1).
The attribute is only supported on Microsoft Windows and Qt. Please note the following:
- Lines whose length exceeds the edittext width are automatically wrapped when .hsb_visible = false.
Windows-specific:
- If both attributes .multiline and .hsb_visible have the value true, .alignment is not supported.
- For RTF edittexts (.options[opt_rtf] = true), the RTF formatting and not the .alignment attribute determines the text alignment.
Qt-specific:
- For HTML edittexts (.options[opt_rtf] = true), the HTML formatting and not the .alignment attribute determines the text alignment.
The text is top-aligned to be compatible with an insensitive statictext.