TRVAHFInfo

<< Click to display table of contents >>

TRVAHFInfo

TRVAHFInfo is the class used for storing properties of a header and a footer in RichViewActions.

Unit RichViewActions

Syntax

TRVAHFInfo = class(TPersistent);

Hierarchy

TObject

TPersistent

Description

This is the type of TRVAControlPanel.Header and Footer properties.

This class has the following properties.

Text: String – text displayed in header/footer. This text may contain the following codes:

&p – index of the current page (counted from TRVAControlPanel.FirstPageNumber);

&P – count of pages;

&d – current date (DateToStr)

&t – current time (DateTimeToString(..., ShortTimeFormat, Time))

&& – '&' character.

You can implement your own one-letter codes using OnGetHeaderFooterCode event.

Default value: '' (empty string) for footer, '- &p -' for header.

Alignment: TAlignment – horizontal alignment of text. Default value: taCenter.

PrintOnFirstPage: Boolean – specifies whether the header/footer is printed on the first page. Default value: True.

Font: TRVAFont – font for printing text. Default value: Arial, 10 (where TRVAFont = class(TFont)).

 

RichViewActions print header and footer by assigning a temporal handler of TRVPrint.OnPagePrepaint event. If TRVPrint component (specified in TRVAControlPanel.RVPrint) already has this event assigned, the temporal event handler calls the old handler before drawing text.