procedure TForm2.Button2Click(Sender: TObject);
var
s: String;
begin
s := ''
+ '{\rtf1\ansicpg1252' // header,
unicode (
ansi) - western european
+ '\deff2{' // default font: 2
+ '\fonttbl{' // font table:
+ '\f0 Arial;' // font 0: Arial
+ '\f1 Consolas;' // font 1: Consolas
+ '\f2 Times New Roman;' // font 2: Times New Roman
+ '}}'
+ '{\colortbl' // color table
+ ';\red255\green0\blue0' // color: full red
+ ';\red255\green255\blue0' // yellow
+ ';'
+ '}'
// simple text block
+ '{\fs42' // font size: 24
+ '\f2' // family: Time New Roman
+ '\highlight2' // font background color: 2 (yellow)
+ '\cf1' // font color: 1 (red)
+ '{\b\ul\i ' // bold, underlined, italic
+ 'Halllo Welt !!!' // the text to be inserted
+ '\i0\ulnone\b0}' // switch off italic
+ '{\line ' // insert new line
+ '33 }' // text to be inserted
+ '{\strike ' // striked text
+ 'AaAA22 }' // the text to be inserted
+ '{\strike0 ' // switch off striked text
+ 'Cowboy}'
+ '{\line\line\super ' // newline + superscript next text
+ 'hochgestellt} '
+ '{\sub ' // subscript next text
+ 'tiefgestellt}'
+ '\par\
qc zentriert' // newline + centered next text
+ '\par\qr rechts' // newline + right next text
+ '\par\ql links \par' // + left ...
+ '}'
+ '{\trowd' // table row definition
+ '\clbrdrl\brdrs\brdrw200' // border: left, simgle line, width: 200
+ '\clbrdrt\brdrs\brdrw200' // : top
+ '\clbrdrb\brdrs\brdrw200' // : bottom
+ '\clbrdrr\brdrs\brdrw200' // : right
+ '\cellx4000' // cell x(width) limit
+ 'cell 1\intbl\cell'
+ 'cell 2\intbl\cell'
+ 'cell 3\intbl\cell'
+ '\row'
+ '}}';
try
FEditorFrame.RichEdit1.PlainText := false;
FEditorFrame.RichEdit1.Lines.Clear;
FEditorFrame.RichEdit1.Lines.Add(s);
except
on E:
Exception do
begin
if E.ClassName = 'EOutOfResources' then
begin
end;
end;
end;
end;