TRVStyleTemplateCollection.LoadFromRVST, SaveToRVST

<< Click to display table of contents >>

TRVStyleTemplateCollection.LoadFromRVST, SaveToRVST

The methods load and save style templates to files.

function LoadFromRVST(const FileName: TRVUnicodeString; Units: TRVStyleUnits): Boolean;

function SaveToRVST(const FileName: TRVUnicodeString; Units: TRVStyleUnits): Boolean;

(changed in version 18)

Files of "RichView Styles" format contain style templates. Normally they have "rvst" extension. Files of these formats can be imported and exported in the RichViewActions' style management dialog window (displayed by TrvActionStyleTemplates action).

When saving, specify Units used by the style templates:

for RVStyle.StyleTemplates, this is RVStyle.Units;

for rvActionNew.StyleTemplates or rvActionStyleTemplates.StandardStyleTemplates, this is RVAControlPanel.UnitsProgram.

When loading, Units are specified similarly. LoadFromRVST converts the loaded style templates to the specified Units.

Note: after loading to RVStyle.StyleTemplates, clear RVStyle.TextStyles and ParaStyles (because the old items may contain references to previous style templates). Then you can add default text and paragraph styles (see the example).


Demos\*\Editors\StyleTemplates\ demo loads "default.rvst" in "File | New" command.

See also