Sign in Join
FPDoc Onlineexperiment

TPrinter.Refresh procedure

Member of TPrinterpublicIn unit Printers

Refreshes the printer list, fonts, and current device selection.

Declaration

pascal
procedure Refresh

Description

Refresh performs actions needed to update the list or printers or fonts when the SetPrinter method is used to change the selected printer, such as:

  • Raises an exception if the printer is currently Printing.
  • Clears and reloads values in the Printers property.
  • Clears and reloads values in the Fonts property.
  • Saves and restores the current printer selection when possible.

PrinterIndex is set to -1 if the previous printer cannot be re-selected after loading values in Printers. The selects the default printer when the previous selection becomes unavailable.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.