This allows for formatting of text as follows:
"\n" Defines a line break.
"\b" Enables bold type. Succeeding characters are
rendered using a bold font.
"\i" Enables italic type. Succeeding characters are
rendered using an italic font.
"\u" Enables underlined text. Succeeding characters are
rendered using an underlined font.
"\c" Cancels bold, italic and/or italic mode. Succeeding
characters are rendered using a plain (normal)
font.
"\t" Tab character. Display of succeeding characters
resumes at the next tab stop.
Here is a code example:
Code: Select all
#INCLUDE "dcdialog.CH"
FUNCTION Main()
LOCAL GetList[0], cText
TEXT INTO cText WRAP "\n" TRIMMED
Test line with a few \bbold\c characters. A few
chars in this line look \if\bunn\cy, too.
\tThis line is indented, as is the next one.
\t\uSee\c what I mean?
All courtesy of the \b\uFORMATTED\c clause...
Now is the time for all good men to come to the aid of their country.
The quick red fox jumped over the lazy dog's back.
ENDTEXT
@ 0,0 DCSTATIC TYPE XBPSTATIC_TYPE_TEXT SIZE 0 ;
CAPTION cText FORMATTED ;
FONT '12.Lucida Console' ;
COLOR GRA_CLR_DARKRED, GRA_CLR_WHITE
DCREAD GUI FIT TITLE 'Formatted Text'
RETURN nil
* ----------
PROC appsys ; return