Loading and saving background colours to stream in RVF

General TRichView support forum. Please post your questions here
Post Reply
martindholmes
Posts: 131
Joined: Mon Aug 29, 2005 12:03 pm

Loading and saving background colours to stream in RVF

Post by martindholmes »

In my app, I save small documents to RVF streams and reload them when required, and when text is highlighted with a background colour, the colour is lost when the document is reloaded.

The Help file says:

rvfoSaveBack:

If set, background (color and image) is saved in RVF.This flag affects only saving the whole document; selection is never saved (or copied to the Clipboard) with background.

This is a bit puzzling -- is it really true? My users want to be able to highlight blocks of text and give them background colours. Is it really impossible to save and load these background colours in RVF, or copy them to the clipboard?

Cheers,
Martin
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

rvfoSaveBack and rvfoLoadBack affect saving/loading of document background (Color, BackgroundBitmap and BackgroundStyle properties). The help says that these properties are not read when inserting RVF. It's perfectly logical, because "Insert File" or "Paste" commands must not change document background.

Background color of text is a property of text style. Make sure that styles are saved and loaded together with documents. Right click TRichViewEdit in Delphi, choose "Settings" in the popup menu, select "Allow adding styles dynamically".
Post Reply