"LoadRVFFromStream" method failed?

General TRichView support forum. Please post your questions here
Post Reply
SKY

"LoadRVFFromStream" method failed?

Post by SKY »

Hi all,
1. I used "SaveRVFToStream" to save my "RichViewEdit" content into a stream, and Compress Stream to Save the file.
2.Read stream from file and decompress this Stream, and then use "LoadRVFFromStream" it from the stream, but the "LoadRVFFromStream" method is failed.
I uses ZLip.TCompressionStream Method to do compress.
Can you send me a tutorial to help me with this?
Ths
Sergey Tkachenko
Site Admin
Posts: 17522
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Make sure that you call Stream.Position := 0 before loading and RichViewEdit.Format after.
If it will not help, please save the content of this stream after decompression to a file and send this file to me ( svt@trichview.com )
SKY

to Sergey

Post by SKY »

Thanks
I make sure that call Stream.Position := 0 before loading and RichViewEdit.Format after. But problem is not solved.
I Sended a file to you.

thanks!
Sergey Tkachenko
Site Admin
Posts: 17522
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

I received your file. It does not contain collections of text and paragraph styles, so it can be loaded only in TRichView having exactly the same collection of styles.

If these collection are saved inside the file, this file can be loaded in any TRichView. Right click TRichViewEdit in Delphi, choose "Settings" in the popup menu, select "Allow adding styles dynamically".
Post Reply