|Top Previous Next|
A list of headers and footers.
The main property of TSRVSubDocuments is Items:
The Index specifies the header or footer type:
Items is the default property, so you can access (for example) the first page header as SRichViewEdit.Subdocuments[srvhftFirstPageHeader].
Each subdocument is linked to its own TRVStyle object. You can access it as SRichViewEdit.Subdocuments[srvhftFirstPageHeader].GetRVStyle. RichViewEdit.Style is assigned as MainRVStyle to these TRVStyle objects, so they all use a common collection of StyleTemplates.
When an event occurs in some subdocument, RichViewEdit is passed as the Sender parameter of this event.
When a header is activated for editing (by double clicking or by calling StartEditing), a document is loaded in RVHeader. When a footer is activated for editing, a document is loaded in RVFooter. An edited document is saved back to Subdocuments when the editing is finished, or when the main document needs to be saved or printed. The process of saving and loading data between Subdocuments and RVHeader/RVFooter is completely automatic and transparent for the user.
Saving to files
Headers and footers can be saved in RVF, RTF, DocX files, loaded from RVF, RTF files.
PageProperty.TitlePage and FacingPages only turn on/off displaying of the specific headers and footers. They do not affect saving and loading: all headers and footers are stored.
Assigning PageProperty.HeaderVisible=False prevents saving and loading headers.
Assigning PageProperty.FooterVisible=False prevents saving and loading footers.
ScaleRichView © trichview.com