Z
zhlfdm
Unregistered / Unconfirmed
GUEST, unregistred user!
//要做的控件
unit QLB;
interface
uses
SysUtils, Classes, QControls, QStdCtrls;
type
TLB = class(TLabel)
private
FAbout: String;
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
published
{ Published declarations }
property About:String read FAbout write FAbout;
end;
implementation
end.
//关于窗体
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm2 = class(TForm)
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
end.
//注册窗体
unit Unit3;
interface
uses DesignEditors, DesignIntf, Classes,unit2,qlb;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('aa', [TLb]);
RegisterPropertyEditor(TypeInfo(string), Tlb, 'About',Tform2);
RegisterComponentEditor(Tlb,Tform2);
end;
end.
//你看我写的对不。
怎么还是那个错误
unit QLB;
interface
uses
SysUtils, Classes, QControls, QStdCtrls;
type
TLB = class(TLabel)
private
FAbout: String;
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
published
{ Published declarations }
property About:String read FAbout write FAbout;
end;
implementation
end.
//关于窗体
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm2 = class(TForm)
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
end.
//注册窗体
unit Unit3;
interface
uses DesignEditors, DesignIntf, Classes,unit2,qlb;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('aa', [TLb]);
RegisterPropertyEditor(TypeInfo(string), Tlb, 'About',Tform2);
RegisterComponentEditor(Tlb,Tform2);
end;
end.
//你看我写的对不。
怎么还是那个错误