Using TRichView (Demo) for the first time ...
Posted: Sun Oct 22, 2017 1:29 pm
I just downloaded and installed the TRichView demo:
On a simple form (Delphi Tokyo 10.2.1), should not the following display the contents of a file?
Thanks,
Navid
On a simple form (Delphi Tokyo 10.2.1), should not the following display the contents of a file?
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
var
ss: TStringStream;
const
CR: Byte = 13;
LF: Byte = 10;
begin
ss := TStringStream.Create;
try
ss.LoadFromFile('c:\Temp\Document.rtf');
Memo1.Lines.Text := ss.DataString;
// RichViewEdit1.LoadRTF('c:\Temp\Document.rtf'); // Does not show text
ss.Position := 0;
// RichViewEdit1.UseStyleTemplates := False;
RichViewEdit1.LoadRTFFromStream(ss); // Does not show text
// RichView1.LoadRTFFromStream(ss); // does not work either
finally
ss.Free;
end;
end;
Navid