Home

VCL Controls:
The Print Setup Dialog Box

 
 

Introduction

As opposed to directly printing a file, a user may want to perform some preliminary preparation on the file or the printer. Microsoft Windows provides another dialog box used to control printing. It is called Print Setup:

 

When using the Print Setup dialog box, the user must first select a printer. This is usually done already by the operating system that selects the default printer of the computer that called this dialog box. Otherwise, if there is more than one printer, the user can change it using the Name combo box.

The options of the Print Setup dialog box depend on the driver of the printer selected in the Name combo box.

The Print Setup dialog box allows the user to select a printer, if there is more than one, and to customize the appearance of the paper on which the document would be printed. On the Print Setup, the user can click the arrow of the Size combo box and select one of the configured sizes of paper:

If the printer has many trays, as indicated by the driver of the selected printer, the user can select which tray would be used when printing. As it happens, one printer can have only one tray while another printer can have 3, 5, or more:

If the desired printer is on a network, the user can click the Network button to locate it. He or she also has the option to print the document in Portrait (vertical) or in Landscape (horizontal) position.

Creation of the Print Setup Dialog box

In VCL applications, the Print Setup dialog box is provided by the TPrinterSetupDialog class. To make a Print Setup dialog available, at design time, from the Dialogs property sheet of the Component Palette, click the PrintSetupDialog button and click on the form. Because the options of the Print Setup dialog box are configured and controlled by the driver of the printer selected, there is no significant configuration you need to perform.

Home Copyright 2005-2007 FunctionX, Inc.