Appending from a RVF into ScaleRichView
Posted: Sun Nov 25, 2018 12:42 pm
Hi,
I could not find an answer in the forum, hence the question. Pardon me if this is silly, since I am short on time for the project.
I want to append an RVF file at the end of my current ScalerichView file, (I modified the the Actiontest from the demo from scalerichview) .
I use the following code for that.
In the file 1664.rvf, the data is Right Aligned, but when it is appended, it becomes left aligned. I am bit confused on accessing the parastyles etc in scalerichview.
First I load into a RichViewEdit, then to the Actual Editor, is there any other way where i can directly append this file.
var Stream: TMemoryStream;
cFile : String;
begin
cFile := '\\bmh-doc\RADIOLOGY\SIGNATURES\1664.rvf'; // This part is dynamic . I added for a reference
RichViewEdit1.Clear;
RichViewEdit1.LoadRVF(cFile);
RichViewEdit1.Format;
Stream := TMemoryStream.Create;
try
RichViewEdit1.SaveRVFToStream(Stream, False);
Stream.Position := 0;
// This is the scalerichview Editor
TextEdit.RichViewEdit.AppendRVFFromStream(Stream,0);
TextEdit.Format;
finally
Stream.Free;
end;
Please help,
thanks in advance.
I could not find an answer in the forum, hence the question. Pardon me if this is silly, since I am short on time for the project.
I want to append an RVF file at the end of my current ScalerichView file, (I modified the the Actiontest from the demo from scalerichview) .
I use the following code for that.
In the file 1664.rvf, the data is Right Aligned, but when it is appended, it becomes left aligned. I am bit confused on accessing the parastyles etc in scalerichview.
First I load into a RichViewEdit, then to the Actual Editor, is there any other way where i can directly append this file.
var Stream: TMemoryStream;
cFile : String;
begin
cFile := '\\bmh-doc\RADIOLOGY\SIGNATURES\1664.rvf'; // This part is dynamic . I added for a reference
RichViewEdit1.Clear;
RichViewEdit1.LoadRVF(cFile);
RichViewEdit1.Format;
Stream := TMemoryStream.Create;
try
RichViewEdit1.SaveRVFToStream(Stream, False);
Stream.Position := 0;
// This is the scalerichview Editor
TextEdit.RichViewEdit.AppendRVFFromStream(Stream,0);
TextEdit.Format;
finally
Stream.Free;
end;
Please help,
thanks in advance.