home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / sibylft1.zip / DOC.DAT / DOC / SPCC / PRNDLGS.PAS < prev    next >
Pascal/Delphi Source File  |  1997-04-07  |  3KB  |  117 lines

  1.  
  2. {********************************************}
  3. {*                                          *}
  4. {* Speed-Pascal 2.0 Printer Dialog Unit     *}
  5. {*                                          *}
  6. {* Copyright (c) 1996-1997 Michael Kroll    *}
  7. {*                                          *}
  8. {* Please mail all bugs and suggestions to: *}
  9. {*                                          *}
  10. {* Internet: michael.kroll @ cww.de         *}
  11. {* FidoNet:  Michael Kroll @ 2:2448/136.16  *}
  12. {*                                          *}
  13. {********************************************}
  14.  
  15. Unit PrnDlgs;
  16.  
  17. Interface
  18.  
  19. {$r PrnDlgs.Srf}
  20.  
  21. Uses
  22.   Classes, Forms, Dialogs, Buttons,
  23.   StdCtrls, Printers, ComCtrls, SysUtils, ExtCtrls;
  24.  
  25. Type
  26.   TPrinterSetupDialog = Class (TDialog)
  27.   Private
  28.     FPrinterListHeadLine: TLabel;
  29.     FPrinterList: TListBox;
  30.     FPrinterGroupCaption: String;
  31.     FSetPrinterButton: TBitBtn;
  32.     FCancelButton: TBitBtn;
  33.     FPropertyButton: TBitBtn;
  34.     FHelpButton: TBitBtn;
  35.     FOkName: String;
  36.     FOldPrinterIndex: LongInt;
  37.  
  38.     Procedure PrinterSelected (Sender: TObject; Index: LongInt);
  39.     Procedure PrinterFocused (Sender: TObject; Index: LongInt);
  40.     Procedure PropertyBtnClicked (Sender: TObject);
  41.     Procedure SetOkName (NewName: String);
  42.  
  43.   Protected
  44.     Procedure SetupComponent; Override;
  45.  
  46.   Public
  47.     Function Execute: Boolean; Override;
  48.  
  49.   Published
  50.     Property OkName: String Read FOkName Write SetOkName;
  51.   End;
  52.  
  53. {Exports
  54.   TPrinterSetupDialog,'Dialog','PRNDLGS3.BMP';}
  55.  
  56. Type
  57.   TPrintDialog = Class (TDialog)
  58.   Private
  59.     FTitleBox: TGroupBox;
  60.     FTitle: TEdit;
  61.     FOptionsGroupBox: TGroupBox;
  62.     FNumberOfCopiesLabel: TLabel;
  63.     FNumberOfCopies: TUpDown;
  64.     FNumberOfCopiesEdit: TEdit;
  65.     FPagesBox: TRadioGroup;
  66.     FPrintFromLabel: TRadioButton;
  67.     FPrintFrom: TUpDown;
  68.     FPrintFromEdit: TEdit;
  69.     FPrintToLabel: TLabel;
  70.     FPrintTo: TUpDown;
  71.     FPrintToEdit: TEdit;
  72.     FPrintAll: TRadioButton;
  73.     FOptionsBox: TRadioGroup;
  74.     FPrinter: TRadioButton;
  75.     FFileOutPut: TRadioButton;
  76.     FFile: TEdit;
  77.     FPrintButton: TBitBtn;
  78.     FCancelButton: TBitBtn;
  79.     FPropertyButton: TBitBtn;
  80.     FHelpButton: TBitBtn;
  81.     FCopies: LongInt;
  82.     FMinPage: LongInt;
  83.     FMaxPage: LongInt;
  84.     FFromPage: LongInt;
  85.     FToPage: LongInt;
  86.     FAllPages: Boolean;
  87.     FOkName: String;
  88.     FOldPrinterIndex: LongInt;
  89.  
  90.   Protected
  91.     Procedure PropertyBtnClicked (Sender: TObject);
  92.     Procedure SetupComponent; Override;
  93.     Procedure SetMinPage (NewValue: LongInt);
  94.     Procedure SetMaxPage (NewValue: LongInt);
  95.     Procedure SetToPage (NewValue: LongInt);
  96.     Procedure SetFromPage (NewValue: LongInt);
  97.     Procedure SetOkName (NewName: String);
  98.     Procedure UpdateSpinSize (Sender: TObject);
  99.  
  100.   Public
  101.     Function Execute: Boolean; Override;
  102.     Property AllPages: Boolean Read FAllPages;
  103.     Property MinPage: LongInt Read FMinPage Write SetMinPage;
  104.     Property MaxPage: LongInt Read FMaxPage Write SetMaxPage;
  105.     Property FromPage: LongInt Read FFromPage Write SetFromPage;
  106.     Property ToPage: LongInt Read FToPage Write SetToPage;
  107.  
  108.   Published
  109.     Property OkName: String Read FOkName Write SetOkName;
  110.   End;
  111.  
  112. {Exports
  113.   TPrintDialog,'Dialog','PRNDLGS2.BMP';}
  114.  
  115. Implementation
  116.  
  117.