rbWiki > Plugins > Dialogs > How To...Create a Custom Print Dialog

How To...Create a Custom Print Dialog

Table of contents
  1. 1. Question 
  2. 2. Solution

Question 

"How do I replace the existing print dialog with a custom one of my own?" 

Solution

Use the built-in dialog replacement architecture to create and register your own print dialog.  Start by copying the existing dialog located in the ppPDlg.pas file and renaming the class and file name.  Finally inside the initialization and finalization sections, register the new dialog.

Download: CustomPrintDlg.zip

Sample Delphi code:

//TppCustomPrintDialog is the ancestor to the Print Dialog. 

initialization

  ppRegisterForm(TppCustomPrintDialog, TmyPrintDialog);

finalization

  ppUnRegisterForm(TppCustomPrintDialog);

end.
Tags
none

Files (0)

 
You must login to post a comment.