home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 September / Chip_2001-09_cd1.bin / zkuste / delphi / kompon / d23456 / TB97.ZIP / Source / TB97Reg.pas < prev    next >
Pascal/Delphi Source File  |  2001-06-18  |  1KB  |  61 lines

  1. unit TB97Reg;
  2.  
  3. {
  4.   Toolbar97
  5.   Copyright (C) 1998-2001 by Jordan Russell
  6.   For conditions of distribution and use, see LICENSE.TXT.
  7.  
  8.   Design-time component registration
  9.  
  10.   $Id: TB97Reg.pas,v 1.4 2001/06/18 18:52:10 jr Exp $
  11. }
  12.  
  13. interface
  14.  
  15. {$I TB97Ver.inc}
  16.  
  17. procedure Register;
  18.  
  19. implementation
  20.  
  21. uses
  22.   SysUtils, Classes, Dialogs, 
  23.   {$IFDEF TB97D6} DesignIntf, DesignEditors, {$ELSE} DsgnIntf, {$ENDIF}
  24.   TB97Vers, TB97, TB97Tlbr, TB97Tlwn, TB97Ctls;
  25.  
  26. type
  27.   TToolbar97VersionProperty = class(TStringProperty)
  28.   public
  29.     procedure Edit; override;
  30.     function GetAttributes: TPropertyAttributes; override;
  31.   end;
  32.  
  33. procedure TToolbar97VersionProperty.Edit;
  34. const
  35.   AboutText =
  36.     '%s'#13#10 +
  37.     'Copyright (C) 1998-2001 by Jordan Russell'#13#10 +
  38.     'For conditions of distribution and use, see LICENSE.TXT.'#13#10 +
  39.     #13#10 +
  40.     'Visit my web site for the latest versions of Toolbar97:'#13#10 +
  41.     'http://www.jrsoftware.org/';
  42. begin
  43.   MessageDlg (Format(AboutText, [GetStrValue]), mtInformation, [mbOK], 0);
  44. end;
  45.  
  46. function TToolbar97VersionProperty.GetAttributes: TPropertyAttributes;
  47. begin
  48.   Result := inherited GetAttributes + [paDialog, paReadOnly];
  49. end;
  50.  
  51.  
  52. procedure Register;
  53. begin
  54.   RegisterComponents ('Toolbar97', [TDock97, TToolbar97, TToolWindow97,
  55.     TToolbarButton97, TToolbarSep97, TEdit97]);
  56.   RegisterPropertyEditor (TypeInfo(TToolbar97Version), nil, '',
  57.     TToolbar97VersionProperty);
  58. end;
  59.  
  60. end.
  61.