Contents
- Index
- Previous
- Next
OnPrintPageBegin event
Applies to
TProfGrid component
Declaration
property OnPrintPageBegin: TProfGridPrintEvent;
Description
Occurs every time when a new page of printout starts.
Tip: The event may be used for changing the PrintHeader and PrintFooter properties (e.g. for printing page numbers on each page).
Example
The following event handler puts page numbers on each of the sheets.
procedure TForm1.ProfGrid1PrintPageBegin(Sender: TProfGrid; APage: Integer);
begin
// New page of printout starts...
// We want to put page numbers in the header of sheets:
Sender.PrintHeader.Lines.Text := 'Page ' + IntToStr(APage);
// ...or in the footer:
Sender.PrintFooter.Lines.Text := 'Page ' + IntToStr(APage);
end;