home *** CD-ROM | disk | FTP | other *** search
/ PC Open 19 / pcopen19.iso / Zipped / CALMIR21.ZIP / SOURCE.ZIP / VCL / NOTEPAD.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1998-02-20  |  876 b   |  49 lines

  1. unit Notepad;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms;
  8.  
  9. type
  10.   TNotepad = class(TComponent)
  11.   private
  12.     FStrings: TStrings;
  13.   protected
  14.     procedure SetStrings(Value: TStrings);
  15.   public
  16.     constructor Create(AOwner: TComponent); override;
  17.     destructor Destroy; override;
  18.   published
  19.     property Strings: TStrings read FStrings write SetStrings;
  20.   end;
  21.  
  22. procedure Register;
  23.  
  24. implementation
  25.  
  26. constructor TNotepad.Create( AOwner: TComponent );
  27. begin
  28.   inherited Create( AOwner );
  29.   FStrings := TStringList.Create;
  30. end;
  31.  
  32. destructor TNotepad.Destroy;
  33. begin
  34.   FStrings.Free;
  35.   inherited Destroy;
  36. end;
  37.  
  38. procedure TNotepad.SetStrings(Value: TStrings);
  39. begin
  40.   FStrings.Assign(Value);
  41. end;
  42.  
  43. procedure Register;
  44. begin
  45.   RegisterComponents('Calmira', [TNotepad]);
  46. end;
  47.  
  48. end.
  49.