HorzAlignment
The HorzAlignment property defines the horizontal position of the text within the text box. Typically, you would define the positioning on the Text Properties window, but you can animate the property if you wish. For example, you can animate the HorzAlignment so that it changes according to the value of a point.
When animating the HorzAlignment property, you will need to use the relevant number in the expression:
Number for Expression | Alignment Style |
---|---|
0 |
Left |
1 |
Center |
2 |
Right |
For example:
IIF( ".1 Bit Digital.AlarmState" = 4, 1, 0 )
In this expression, when the point named '1 Bit Digital' has an alarm state of 4 (unacknowledged uncleared alarm), the text is centered horizontally (HorzAlignment 1). When the point has any other alarm state, the text is left aligned horizontally (HorzAlignment 0).
NOTE: For text to be positioned in the center of a text box, both the VertAlignment and HorzAlignment need to be set on the Text Properties window or animated.