textAlignment

 

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

Includes two subproperties, horizontal textAlignment and vertical textAlignment.

 

in Lycia Form Designer

 

in Lycia Theme Designer

 

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

TabPage

ScrollViewer

Table

TreeTable

BlobViewer

Button

Calendar

CheckBox

ComboBox

FunctionField

Label

 

ListBox

MenuBar

MenuGroup

MenuCommand

MenuSeparator

RadioButton

RadioButtonList

ScrollBar

Separator

TextArea

TextField

ToolbarGroup

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.

 

 

 

 

 

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

 

With RadioButtonList, RadoiButtonList items inherit horisontal textAlignment but ignore vertical textAlignment

 

lycia form designer

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

 

 

runtime appearance

 

 

Example programs:

CVS server: client.querix.com

CVS repository: /lycia_doc_examples

User: client

Project: form_properties

Program: textalignment

 

Related articles:

horizontalAlignment

verticalAlignment

imagePosition