TSRichViewEdit.MaxPrintedItemNo, MaxPrintedOffsInItem

<< Click to display table of contents >>

TSRichViewEdit.MaxPrintedItemNo, MaxPrintedOffsInItem

The properties define the ending position to print.

property MaxPrintedItemNo: Integer;

property MaxPrintedOffsInItem: Integer;

The component prints items from (MinPrintedItemNo, MinPrintedOffsInItem) to (MaxPrintedItemNo, MaxPrintedOffsInItem). By default, this range includes all items.

Items outside of this range  are not printed (but they still occupy their spaces). The pages that do not contain items in this range are skipped (the component prints pages from FirstPageNo to LastPageNo).

MaxPrintedItemNo is the index of item in RichViewEdit, the last item to print. The value -1 is treated like RichViewEdit.ItemCount-1, i.e. the document is printed to the end.

MaxPrintedOffsInItem is the offset of the last position in the MaxPrintedItemNo-th item to print. The value -1 is treated like RichViewEdit.GetOffsAfterItem(MaxPrintedItemNo), i.e. the item is printed completely. If this is a text item, this property allows printing a part of it. The position is defined with up-to-line, not up-to-character precision (i.e., if the item is displayed as several lines, and the specified position is in the middle of a line, the part of item on this line is printed).

These properties allow implementing an incremental printing: when the next portion of the document is ready, it can be printed below the previously printed fragment. This feature can be used for printing accounting journals, logs, etc.

Default value:

-1