29
<CA>
Centre Align
Attributes
Description
Set the attribute so that written text is aligned horizontally within the screen or defined window
Parameters
None
Initial Value
Not aligned; Text appears at the current cursor position
Modes
All Modes
Notes
This command only affects text written after the attribute has been set.
In Pixel Mode <PM> the centring is always based on the full screen. In row mode the text is centred
in the currently defined window, which by default is the full screen.
The attribute is cancelled by the <NA> command or any of the other text alignment commands
<LA>, <RA>, <SW> & <TW>
Uses
The <CA> command allows:
•
Text to be automatically aligned without the need for cursor move commands
•
Tidy screen presentation
Example
<PM>
Set Pixel Mode
<CM40,0>
Set up the vertical position: move the cursor to 40 pixels down from
the top of the screen, on the left hand side of the screen
<CA>
Align all following text centrally
<WTThis is centred>
Write the message
The horizontal position is
calculated from the length and
size of the text
<RM>
Set Row Mode
<DW0,7,60,119>
Define a window as the right hand half of the screen
<CM1,0>
Move the cursor to row 1 (one row from the top)
<CA>
Align all following text centrally
<WTThis>
Write the text
<LN>
Move the cursor down one line
<WTis>
Write the text
<LN>
Move the cursor down one line
<WTcentred>
Write the text
See Also
LA
Left Align
NA
No Align
RA
Right Align
SW
Smart Wrap
TW
Text Wrap