home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue32 / forms / NDXDemos / prevform.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1998-02-21  |  783 b   |  42 lines

  1. unit Prevform;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, StdCtrls, Buttons, ExtCtrls, Prevcomp, PrevType,
  8.   Printers;
  9.  
  10. type
  11.   TCCForm = class(TForm)
  12.     Memo1: TMemo;
  13.     Panel1: TPanel;
  14.     BitBtn1: TBitBtn;
  15.     procedure BitBtn1Click(Sender: TObject);
  16.   private
  17.     { Private declarations }
  18.     procedure SetFileToShow(Value: string);
  19.   public
  20.     { Public declarations }
  21.     property FileToShow: string write SetFileToShow;
  22.   end;
  23.  
  24. var
  25.   CCForm: TCCForm;
  26.  
  27. implementation
  28.  
  29. {$R *.DFM}
  30.  
  31. procedure TCCForm.SetFileToShow(Value: string);
  32. begin
  33.   Memo1.Lines.Clear;
  34.   Memo1.Lines.LoadFromFile(Value);
  35. end;
  36. procedure TCCForm.BitBtn1Click(Sender: TObject);
  37. begin
  38.   Close;
  39. end;
  40.  
  41. end.
  42.