Purpose

.Alignment allows you to specify alignment to be applied to certain objects.
 

Syntax

Setting:          ObjectReference.Alignment = Value

Retrieving:     Variable = ObjectReference.Alignment
 

Operation

ObjectReference is the Tag Name of the object
Value
is the value to be applied (the valid values vary depending on the object type)

Variable is an alphanumeric scratch variable
 

Remarks

Once the .Alignment property command is executed in logic it will be visually applied during the next display cycle.

The retrieved value is returned in upper case.
 

Example

To set the .Alignment property for the data in a combo box (Tag Name = CustomerNumber) to be right-aligned by using an alpha scratch variable.

$RIGHT = 'RIGHT'
CustomerNumber.ALIGNMENT = $RIGHT


To set the .Alignment property of that same combo box to the value of the current alignment of the combo box whose Tag Name is CustomerOrderNumber:

CustomerNumber.ALIGNMENT = CustomerOrderNumber.ALIGNMENT


To set the .Alignment property for the box label whose Tag Name is CustomerNameBoxLabel to be centre justified:

CustomerNameBoxLabel.ALIGNMENT = 'CENTER'


To set the .Alignment property of the label for an icon (Tag Name = CustomerActiveIcon) so the label is located at the Top_Center of the icon:

CustomerActiveIcon.ALIGNMENT = 'TOP_CENTER'


To retrieve the value of the .Alignment property for the box label CustomerNameBoxLabel:

$CustomerNameBoxLabel_ALIGN = CustomerNameBoxLabel.ALIGNMENT
 

Comment on this topic

Topic ID: 510032