Contents - Index - Previous - Next


Print method



Applies to
TProfGrid component

Declaration
function Print: Integer;

Description

Initiates a print job, prints the grid, and ends the print job.

The return value is the total number of pages in the printout. The return value of -1 indicates an error.

Tips:

1. Various printing options can be controlled with the print-related properties of the component.

2. Use the VCL-defined Printer() function to manage interaction with the printer. For example, use TPrinter.Orientation to determine if a print job prints in landscape or portrait.


Example

procedure TForm1.Button1Click(Sender: TObject);
begin
  Printer.Orientation := poLandscape;
  ProfGrid1.Print;
end;