rvico TRichView Reference | Item Types

Page Numbers

Top  Previous  Next

When inserted in TRichView or TRichViewEdit, this item is displayed as '{p}'.

When printing with TRVPrint, this item displays a page number where this item is located. Page numbers are counted from TRVPrint.PageNoFromNumber.

When drawing with TRVReportHelper, the default behavior is like in TRVPrint, but you can provide a value for the page number in OnGetPageNumber event.

srv_icon ScaleRichView: When inserted in TSRichViewEdit, this item displays a page number where this item is located. Page numbers are counted from TSRichViewEdit.PageProperty.PageNoFromNumber.

You can insert this item in the main document, a note, a text box, a header or a footer.

Class for this item type is TRVPageNumberItemInfo  (see for detailed information).

Style of this item type: rvsPageNumber (-208)

Methods of TCustomRichView

The following viewer-style method adds item of this type to the end of the document:

AddItem (create TRVPageNumberItemInfo object, add it using AddItem)

The following method returns TRVPageNumberItemInfo object

GetItem

Methods of TCustomRichViewEdit

The following editor-style method inserts item of this type in the position of caret:

InsertItem (create TRVPageNumberItemInfo object, insert it using InsertItem)

The following method returns TRVPageNumberItemInfo object at the position of caret:

GetCurrentItem.

The following methods change properties of items as editing operations:

SetCurrentItemExtraIntPropertyEx;

SetItemExtraIntPropertyExEd;

SetCurrentItemExtraStrPropertyEx;

SetItemExtraStrPropertyExEd.

Properties

Fields have all properties of label items.

By default, Text='{p}'. You can change this value to display another code in TRichView and TRichViewEdit.

Additionally, it has property:

NumberType – numbering type;

This property is also accessible as rveipcPageNumberType property. Accessing it in this way allows changing it in editing operations.

Saving and Loading

Export to HTML

Fields are saved as a plain text.

RTF

Fields can saved to RTF and loaded from RTF. You can disallow loading from RTF by assinging TRichView.RTFReadProperties.IgnoreFields=True.

Export to DocX

Fields can be exported in DocX


TRichView © trichview.com