Page 1 of 1

SaveRVFToStream problem (TRichView 1.9.11)

Posted: Wed Nov 23, 2005 2:55 pm
by dpbug
i find a problem. rv1 can show the content of file, but rv2 show nothing !
why? how can i do it?

this is the problem code:

procedure TForm1.Button1Click(Sender: TObject);
var
s: TMemoryStream;
begin
s:= TMemoryStream.Create;
rv.LoadRVF('c:\tmp.rvf');
rv.Format;

rv.SaveRVFToStream(s, false);

rv2.LoadRVFFromStream(s);
rv2.Format;
end;

Posted: Wed Nov 23, 2005 5:21 pm
by Michel
You are most likely missing
s.Position := 0;
right before the rv2.LoadRVFFromStream(s) line.
Michel