Returns or sets the object over the position of the text next (left, right, or centered) at run time.
Object.Alignment [ = enAlignment ]
The Alignment property syntax has the following parts:
Name |
Type |
Description |
Object |
ALabel |
ALabel control |
enAlignment |
enumALabelAlignment |
An integer specifying the type of alignment |
enumALabelAlignment can be one of the following:
Name |
Value |
Description |
alblLeft |
0 |
The text of the label is left-aligned. |
alblRight |
1 |
Right |
alblCenter |
2 |
Center |
alblTopLeft |
3 |
Top left |
alblTopRight |
4 |
Top right |
alblTopCenter |
5 |
Top center |
alblBottomLeft |
6 |
Bottom left |
alblBottomRight |
7 |
Bottom right |
alblBottomCenter |
8 |
Bottom center |
Text can be aligned to either the right or left or can be centered in an ALabel control. Be default, the text is left-aligned.
The following statement changes the ALabel Alignment to the right:
lbl1.Alignment = alblRight