[Overview][Types][Classes][Variables][Index] Reference for unit 'Printers' (#lcl)

TPrinter.Printers

Contains the names for devices that can be selected for printing.

Declaration

Source position: printers.pas line 329

public property TPrinter.Printers : TStrings
  read GetPrinters;

Description

Printers is a read-only TStrings property which contains the names for print devices that can be selected in the class instance. By convention, the first print device in Printers is the "default" printer.

Values in Printers are retrieved and stored using the DoEnumPrinters method. This method is called when the property value is retrieved and PrinterFlags does not include the pfPrintersValid flag. It is normally called only once - unless the Refresh or DoResetPrintersList methods are called.

Printers is used in the SetPrinter method to validate the name for the selected printer device. Its Count property is used in other methods to ensure that valid printer devices exist in the class instance.

Use SetPrinter to select a print device by its name. Use PrinterIndex to change the selected device to the printer at the specified ordinal position in Printers.


Version 3.2 Generated 2024-02-25 Home