After I add text to existing document with the following procedure the cursor jumps to the top of the document. Anyway to make the cursor go back where it was before the insertion?
Code: Select all
procedure TRetrieveAutoTextForm.AddReplacementText ;
var Stream: TMemoryStream;
i : integer ;
begin
Stream := TMemoryStream.Create;
AutoTextPreviewDBRichView.SaveRVFToStream(Stream, False);
Stream.Position := 0;
i := ReportWriterMainForm.rve.ItemCount ;
ReportWriterMainForm.rve.InsertRVFFromStreamEd(Stream); // was rve.InsertRVFFromStream(Stream, i )
Stream.Free;
ReportWriterMainForm.rve.Format;
end;