2.10 .alignment

With this attribute you can define the alignment of a text.

Definition

  • Data type

    integer

  • Access

    get, set

  • changed event

    yes

Value range

-1
right-justified
0
centered
1
left-justified

image

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.

notebook

At a notebook this attribute defines the alignment of the status text that every notepage may have (default value 1).

edittext

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.

 

statictext

The text is top-aligned to be compatible with an insensitive statictext.