textAlignment

textAlignment specifies the position of the element text relative to the element's borders.

Includes two sub-properties, horizontal textAlignment and vertical textAlignment.

Form XML code:

<element_name textAlignment="Left,Top>">
By default, textAlignment is not specified and is absent from the form and theme XML codes. The property value will appear in the form and theme XML codes only once it is specified.

Theme property filter XML code:

<DoStyleAction>

  <SetProperty>

    <PropertyPath>

      <PropertyName>TextAlignment</PropertyName>

    </PropertyPath>

    <PropertyValue type="TextAlignment" HorizontalTextAlignment="Left" VerticalTextAlignment="Top" />

  </SetProperty>

</DoStyleAction>

Possible values:

Default value:

default, default

Inheritance diagram

Associated containers, widgets and theme elements:

BorderPanel

CoordPanel

GridPanel

GroupBox

StackPanel

ScrollViewer

Tab

TabPage

Table

TreeTable

BlobViewer

Button

Calendar

Canvas

CheckBox

ComboBox

FunctionField

Label

PlaceHolder

MenuBar

MenuGroup

MenuCommand

ProgressBar

RadioGroup

ListBox

Spinner

TextArea

TextField

Toolbar

ToolbarButton

TimeEditField

WebComponent

Associated 4gl syntax:

DISPLAY 

INPUT 

Influence and behavior:

Default

 

Text is aligned so as it is specified by SystemTheme.css

(the actual alignment can be different for different elements)

Horizontal textAlignment (shown for verticalTextAlignment = Top)

Left

Text is aligned to the left border of the element.

Center

Text is located at the same distances from both vertical borders of the element.

Right

Text is aligned to the right border of the element.

Vertical textAlignment (shown for horizontalTextAlignment = Left)

Top

Text is aligned to the top border of the element.

Center

Text is located at the same distances from both horizontal borders of the element.

Bottom

Text is aligned to the bottom border of the element.

When applied, textAlignment depends on the TYPE of the VARIABLE BOUND TO  the FIELD  but not the data type of the field defined in the form file.

 

By default, text alignment of input fields depends on the data type of the associated variable:

 

When set to a parent widget, textAlignment is not fully inherited by child widgets.

With ListBox, regardless of the textAligment value, text of the listBox items will be aligned as specified by SystemTheme.css:

lycia form designer

For the ListBox (identifier=f1), textAlignment=Right, Center:

runtime appearance

 

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.