unit DesignDemoManager;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
DesignIntf, DesignEditors,
DemoManager;
type
TDemoEditor = class(TPropertyEditor)
public
FStrings: TStrings;
procedure Edit; override;
function GetAttributes: TPropertyAttributes; override;
function GetValue: string; override;
function GetName: string; override;
end;
procedure Register;
implementation
procedure TDemoEditor.Edit;
begin
ShowMessage('OK');
end;
function TDemoEditor.GetAttributes: TPropertyAttributes;
begin
result := [paDialog, paReadOnly];
end;
function TDemoEditor.GetValue: string;
begin
result := '[DemoEditor]';
end;
function TDemoEditor.GetName: string;
begin
result := 'Editor';
end;
//
procedure Register;
begin
RegisterComponents('New', [TDemoManager]);
RegisterPropertyEditor(TypeInfo(TStrings), TDemoManager, 'Strings', TDemoEditor);
end;
end.