rvico TRichView Reference | Item Types | Endnote

TRVEndnoteItemInfo

Properties   Methods

Top  Previous  Next

TRVEndnoteItemInfo is a class representing an endnote 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: rvsEndnote (-204)

Unit RVNote.

Syntax

TRVEndnoteItemInfo = class(TRVFootOrEndnoteItemInfo)

(introduced in version 10)

Hierarchy

TObject

TPersistent

TCustomRVItemInfo

TRVNonTextItemInfo

TRVRectItemInfo

TRVLabelItemInfo

TRVSeqItemInfo

TCustomRVNoteItemInfo

TRVFootOrEndnoteItemInfo

Using

Numbering type for endnotes is defined in EndnoteNumbering property of TRVStyle component (NumberType property, inherited from TRVSeqItemInfo, is ignored).

You can enumerate all endnotes in documents using RVGetFirstEndnote and RVGetNextEndnote functions.

Use RVGetNoteTextStyleNo to assign TextStyleNo property (in the constructor).

Limitation: in TRVReportHelper, all pages consisting only of endnotes' texts have the same height as the last document's page.

Use SetCurrentItemExtraIntPropertyEx and SetCurrentItemExtraStrPropertyEx to change properties of label items as editing operations.

Example

This example inserts a new endnote in rveMain (TCustomRichViewEdit). TextStyleNo for this endnote is returned by RVGetNoteTextStyleNo function basing on the rveMain.CurTextStyleNo-th style).

Document for this endnote 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 EndNote: TRVEndnoteItemInfo;

    NoteRef: TRVNoteReferenceItemInfo;

begin

  EndNote := TRVEndnoteItemInfo.CreateEx(rveMain.RVData,

    RVGetNoteTextStyleNo(rvs, rveMain.CurTextStyleNo), 1, False);

  NoteRef := TRVNoteReferenceItemInfo.CreateEx(EndNote.DocumentRVGetNoteTextStyleNo(rveMain.Style,0));

  EndNote.Document.AddItem('', NoteRef);

  EndNote.Document.AddNL(' '0, -1);

  if rveMain.InsertItem('', EndNote) then

    ...

end;

The topic about TRVNoteReferenceItemInfo contains example showing how to edit Document.

See Also...

Demos:

Demos\Delphi\Editors\Notes

Demos\CBuilder\Editors\Notes


TRichView © trichview.com