The Print Dialog Component

The PrintDialog component encapsulates a Print dialog box. This dialog box can be displayed to the user at run time to allow the user to configure a variety of options for printing as well as allowing the user to choose a printer. The PrintDialog component at run time is shown in Figure 10-1.

Figure 10-1 The PrintDialog component at run time

The PrintDialog component also exposes a variety of properties to the developer that allow him or her to configure the interface of the PrintDialog component when it is shown. The important properties of the PrintDialog component are described in Table 10-1.

Table 10-1 Important Properties of the PrintDialog Component

Property

Description

AllowCurrentPage

Indicates whether the Current Page option button is displayed.

AllowPrintToFile

Indicates whether the Print To File check box is enabled.

AllowSelection

Indicates whether the Selection option button is enabled.

AllowSomePages

Indicates whether the Pages option button is enabled.

Document

The PrintDocument that is associated with the PrintDialog box.

PrinterSettings The PrinterSettings object associated with the selected printer. These settings are modified when the user changes settings in the dialog box.

Table 10-1 Important Properties of the PrintDialog Component

Property

Description

PrintToFile

Indicates whether the Print To File checkbox is selected.

ShowHelp

Indicates whether the Help button is shown.

ShowNetwork

Indicates whether the Network button is shown.

Was this article helpful?

0 0

Post a comment