Z
zqwzz
Unregistered / Unconfirmed
GUEST, unregistred user!
以下为新建的LABEL组件,引入TGraphicControl的Canvas属性。
但在窗体中加入新建的LABEL组件后,设置Canvas中的Brush、FONT、
Pen时,新建的label组件却没变化。 为何?
unit label1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
Tlabel1 = class(Tlabel)
private
protected
public
published
property canvas;
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('My', [Tlabel1]);
end;
end.
但在窗体中加入新建的LABEL组件后,设置Canvas中的Brush、FONT、
Pen时,新建的label组件却没变化。 为何?
unit label1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
Tlabel1 = class(Tlabel)
private
protected
public
published
property canvas;
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('My', [Tlabel1]);
end;
end.