rvico TRichView Reference | TRVStyle | TRVStyleTemplateCollection

TRVStyleTemplateCollection.LoadFromRVST, SaveToRVST

Top  Previous  Next

The methods load and save style templates to files.

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

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

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).

Example:

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

See also

InsertFromRVST


TRichView © trichview.com