3
340340
Unregistered / Unconfirmed
GUEST, unregistred user!
直接Close All之后新建Component,继承TCustomLabel,默认建立后直接保存后install它,能在组件面板Samples中见到,但一建新Project之后,想用它去Samples里找就不见了!右键Palette Properties中找Samples又确实在里面的,就是不能拖出来用,郁闷,不知道为什么,还望知道的大侠指点.代码如下:
unit QMyLael;
interface
uses
SysUtils, Classes, QControls, QStdCtrls;
type
TMyLael = class(TCustomLabel)
private
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
published
{ Published declarations }
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('Samples', [TMyLael]);
end;
end.
unit QMyLael;
interface
uses
SysUtils, Classes, QControls, QStdCtrls;
type
TMyLael = class(TCustomLabel)
private
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
published
{ Published declarations }
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('Samples', [TMyLael]);
end;
end.