unit HDPanel;interfaceuses
SysUtils, Classes, Controls, ExtCtrls, ComCtrls;type
THDPanel = class(TPanel)
private
{ Private declarations }
protected
{ Protected declarations }
public
constructor Create(AOwner: TComponent); override;
{ Public declarations }
published
{ Published declarations }
end;procedure Register;implementationprocedure Register;
begin
RegisterComponents('Samples', [THDPanel]);
end;{ THDPanel }constructor THDPanel.Create(AOwner: TComponent);
var
pctPageControl: TPageControl;
begin
inherited;
pctPageControl := TPageControl.Create(AOwner);
pctPageControl.Parent := Self;
end;end.为什么该组件建立的pageControl会没有名字?
SysUtils, Classes, Controls, ExtCtrls, ComCtrls;type
THDPanel = class(TPanel)
private
{ Private declarations }
protected
{ Protected declarations }
public
constructor Create(AOwner: TComponent); override;
{ Public declarations }
published
{ Published declarations }
end;procedure Register;implementationprocedure Register;
begin
RegisterComponents('Samples', [THDPanel]);
end;{ THDPanel }constructor THDPanel.Create(AOwner: TComponent);
var
pctPageControl: TPageControl;
begin
inherited;
pctPageControl := TPageControl.Create(AOwner);
pctPageControl.Parent := Self;
end;end.为什么该组件建立的pageControl会没有名字?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货