|
TRVFootnoteItemInfo |
Top Previous Next |
|
TRVFootnoteItemInfo is a class representing footnote in TRichView documents. This is not a component. Objects of this class are created at runtime and appended to TRichView (see AddItem) or inserted into TRichViewEdit (see InsertItem). Style of this item type: rvsFootnote (-203) Unit RVNote. Syntax TRVFootnoteItemInfo = class(TCustomRVNoteItemInfo) (introduced in version 10) HierarchyTObject TPersistent TRVNonTextItemInfo TRVRectItemInfo UsingNumbering type for footnotes is defined in FootnoteNumbering property of TRVStyle component (NumberType property, inherited from TRVSeqItemInfo, is ignored). You can enumerate all footnotes in documents using RVGetFirstFootnote and RVGetNextFootnote functions. Use RVGetNoteTextStyleNo to assign TextStyleNo property (in the constructor). Footnotes are numbered continuously in TCustomRichView. But when printing, footnote numbering can be restarted on each page, see FootnotePageReset property of TRVStyle component. Limitation: footnote's Document must not be higher than the page height. Unlike endnotes, footnote is printed on a single page. There are no editing-style methods for changing properties of this item (except for Document). If you want to change them as an editing operation, select this item, delete the selection, then insert a new one with new properties. ExampleThis example inserts a new footnote in rveMain (TCustomRichViewEdit). TextStyleNo for this footnote is returned by RVGetNoteTextStyleNo function basing on the rveMain.CurTextStyleNo-th style). Document for this footnote contains one reference (TextStyleNo for this reference is returned by RVGetNoteTextStyleNo function basing on the 0th style) and one space character of the 0th style. var FootNote: TRVFootnoteItemInfo; NoteRef: TRVNoteReferenceItemInfo; begin FootNote := TRVFootnoteItemInfo.CreateEx(rveMain.RVData, RVGetNoteTextStyleNo(rvs, rveMain.CurTextStyleNo), 1, False); NoteRef := TRVNoteReferenceItemInfo.CreateEx(FootNote.Document, RVGetNoteTextStyleNo(rveMain.Style,0)); FootNote.Document.AddItem('', NoteRef); FootNote.Document.AddNL(' ', 0, -1); if rveMain.InsertItem('', FootNote) then ... end; The topic about TRVNoteReferenceItemInfo contains example showing how to edit Document. See Also...Demos: ▪Demos\Delphi\Editors\Notes ▪Demos\CBuilder\Editors\Notes |