rvico TRichView Reference | TRVStyle | TRVStyleTemplate

TRVStyleTemplate.Name

Top  Previous  Next

Name of the style template.

property Name: TRVStyleTemplateName;

You must provide that each item in the collection has an unique name, otherwise style templates will be saved to RTF and RVF incorrectly.

Special names:

Assigning 'Normal' changes Kind to rvstkPara.

Assigning 'heading 1'...'heading 9' changes Kind to rvstkParaText.

Assigning 'Hyperlink' changes Kind to rvstkText.

Names are used when merging style templates from different documents.

Some names may be reserved for standard style templates. Actually, there is no strict definition of a "standard style template". A "standard style template" is a style template having a special meaning for your application. For example, your application may have a command "Insert Abracadabra" inserting some text and formatting using the style template named "Abracadabra Text". In this case, "Abracadabra Text" is a standard style template for your application.

However, there are style templates having a special meaning for TRichView: "Normal" and "Hyperlink".

"Normal" is a paragraph style template. This style template is special, because it uses some "magic". All paragraph style templates are applied to paragraphs and cannot be applied to text. But applying "Normal" to text clears this text format.

The format clearing command does the following. For paragraphs, it assigns the style template "Normal" and clears all additional paragraph attributes. For non-hypertext text, it removes its style template and clears all additional text attributes. For hypertext links, it assigns the style template "Hyperlink" and clears all additional text attributes.

srv_icon RichViewActions reserve some other names for standard style templates, but only the following are used specially, and only in ScaleRichView:

"header" to apply to headers of new documents;

"footer" to apply to footers of new documents;

"endnote reference"/"footnote reference" to apply to new footnote/endnote characters, and to note references;

"endnote text", "footnote text" to apply to text in Document of new footnote/endnote.

 

See also members of TRVStyleTemplateCollection:

FindByName, FindItemByName;

DefStyleName.


TRichView © trichview.com