[urgent]

General TRichView support forum. Please post your questions here
Post Reply
filipe
Posts: 1
Joined: Sat Aug 26, 2006 1:25 pm

[urgent]

Post by filipe »

How can i join two richviewedit?
for ecemple:
i have ritchviewedit1 with text and richviewedit2 with text
Is possible richviewedit3=ritchviewedit1.text+ritchviewedit2.text
mamouri
Posts: 63
Joined: Sat Aug 19, 2006 5:06 am

Post by mamouri »

var
AStream: TMemoryStream;
begin
try
AStream := TMemoryStream.Create;
SourceRV.SaveRVFToStream(AStream, False);
SourceRV.Position := 0;
DestRV.InsertRVFFromStream(AStream);
DestRV.Format;
finally
AStream.Free;
end;
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Code: Select all

var 
  AStream: TMemoryStream; 
begin 
  try
    AStream := TMemoryStream.Create; 
    RichViewEdit1.SaveRVFToStream(AStream, False); 
    AStream.Position := 0; 
    RichViewEdit1.LoadRVFFromStream(AStream);
    AStream.Clear;
    RichViewEdit2.SaveRVFToStream(AStream, False); 
    AStream.Position := 0; 
    RichViewEdit3.InsertRVFFromStream(AStream, RichViewEdit3.ItemCount); 
    RichViewEdit3.Format; 
  finally
    AStream.Free; 
  end;
end;
Post Reply