unit myComponent;interfaceuses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;type
TCustommyComponent = class(TComponent)
private
//ComponentList:TComponent;
ActionList:integer;
procedure SetmyHeight(value:integer);
{ Private declarations }
protected
{ Protected declarations }
property myHeight:integer read ActionList write SetmyHeight default 2;
public
constructor createIt(Aowner:Tcomponent); { Public declarations }
published { Published declarations }
end; TmyComponent=class(TCustommyComponent)
published
property myHeight;
end;procedure Register;implementation
constructor TmyComponent.createIt(Aowner:Tcomponent);
begin
inherited Create(Aowner);
ActionList:=1;
end;
procedure TmyComponent.SetmyHeight(value:integer);
begin
Actionlist:=1;
end;
procedure Register;
begin
RegisterComponents('Samples', [TmyComponent]);
end;end.
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;type
TCustommyComponent = class(TComponent)
private
//ComponentList:TComponent;
ActionList:integer;
procedure SetmyHeight(value:integer);
{ Private declarations }
protected
{ Protected declarations }
property myHeight:integer read ActionList write SetmyHeight default 2;
public
constructor createIt(Aowner:Tcomponent); { Public declarations }
published { Published declarations }
end; TmyComponent=class(TCustommyComponent)
published
property myHeight;
end;procedure Register;implementation
constructor TmyComponent.createIt(Aowner:Tcomponent);
begin
inherited Create(Aowner);
ActionList:=1;
end;
procedure TmyComponent.SetmyHeight(value:integer);
begin
Actionlist:=1;
end;
procedure Register;
begin
RegisterComponents('Samples', [TmyComponent]);
end;end.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货