Registriert seit: 15. Jun 2008
Ort: Sachsen-Anhalt
109 Beiträge
Delphi XE8 Professional
|
AW: Problem mit Caption bei neuer Komponente basierend auf TLabel
27. Mär 2011, 07:48
Delphi-Quellcode:
unit raka_timestamp;
interface
uses
Classes, Controls, StdCtrls;
type
Ttimestamp = class(TLabel)
private
{ Private-Deklarationen }
FCaption: String; // <--
protected
{ Protected-Deklarationen }
public
{ Public-Deklarationen }
constructor Create(AOwner:Tcomponent); override;
published
{ Published-Deklarationen }
property Caption: String read FCaption write FCaption; // <--
end;
procedure Register;
implementation
uses dialogs,sysutils,forms;
procedure Register;
begin
RegisterComponents(' Standard',[TTimeStamp]);
end;
constructor Ttimestamp.Create(AOwner:TComponent);
begin
inherited Create(AOwner);
Font.Color:=$00FFFF;
FCaption:=' test'; // <-- FCaption!
end;
end.
Ronald
|
|
Zitat
|