Hello!
Have a question about TRichViewEdit (using v1.9.47).
RVE1,RVE2,RVE3: TRichViewEdit;
I need to save data from RVE1 & RVE2 into a stream and then load data from this stream into another RVE3. I get a "list index out of bound" when I format RVE3.
<<source is below>>
RVE1.SaveRVFToStream(stream,false);
RVE2.SaveRVFToStream(stream,false);
...
stream.position := 0
RVE3.LoadRVFFromStream(stream);
RVE3.Format;
TRichViewEdit.Format gives 'list index out of bound'
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Use the following code to copy RVE1+RVE2 in RVE3:
Code: Select all
Stream := TMemoryStream.Create;
RVE1.SaveRVFToStream(Stream,False);
Stream.Position := 0;
RVE3.LoadRVFFromStream(Stream);
Stream.Clear;
RVE2.SaveRVFToStream(Stream,False);
Stream.Position := 0;
RVE3.InsertRVFFromStream(Stream, RVE3.ItemCount);
RVE3.Format;
Stream.Free;