PlainTextProperty (Delphi)
Description
This example requires two TRichEdit controls on the form. When the form becomes visible, the first Rich Edit control displays the rich text in its raw form, including formatting characters. The second shows the rich text in its intended format.
Code
procedure TForm1.FormCreate(Sender: TObject);
const
// You may need to change this path to suit your environment.
Path = 'OverView.RTF';
begin
RichEdit1.PlainText := True;
RichEdit1.Lines.LoadFromFile(Path);
RichEdit1.ScrollBars := ssVertical;
RichEdit2.PlainText := False;
RichEdit2.Lines.LoadFromFile(Path);
RichEdit2.ScrollBars := ssVertical;
end;
Uses
- Vcl.ComCtrls.TCustomRichEdit.PlainText ( fr | de | ja )
- System.Classes.TStrings.LoadFromFile ( fr | de | ja )