103
<SW>
Smart Wrap
Attributes
Description
Force text that cannot fit on the current line, to be written on the next line without splitting words
Parameters
None
Initial Value
<NA> No Alignment
Modes
Row Mode only
Notes
With the <SW> attribute set, the <WT> command will automatically wrap long lines of text without
splitting words. It means that the programmer does not have to worry about the formatting as long as
the text all fits on the screen. The display will scroll in order to display all the text sent.
Smart Wrap is a text alignment attribute that cannot be used in conjunction with any other alignment
command <CA>,<LA>, <RA> or <TW>. It is cancelled by the <NA> command.
<SW> can be used with either the full screen, or within a window.
Uses
The <SW> command allows:
•
Simple formatting of text strings
Example
<SD>
Set the display to a known state
<SW>
Set the Smart Wrap
<WTThis is a very
long line of text
that shows how the
Smart Wrap
attribute
automatically
formats the text.>
Write a lot of text. It all fits on screen
<CS>
Clear the screen
<DW0,7,20,100>
Define a window
<WTThis is a very
long line of text
that shows how the
Smart Wrap
attribute
automatically
formats the text.>
Send the same line of text, but because of the narrowed window it
does not all fit on screen. The display scrolls to accommodate all
the text.
Note that the display has scrolled
See Also
CA
Centre Align
LA
Left Align
NA
No Align
RA
Right Align
TW
Text Wrap