C
Cheasy
Unregistered / Unconfirmed
GUEST, unregistred user!
类文件:
unit LabelView;
interface
uses
Windows, Messages, SysUtils, Classes, Controls, StdCtrls, Graphics;
type Ttst = Record {记录结构}
a:string;
b:string;
c:string;
end;
type
TLabelView = class(TLabel)
private
Ftst:Ttst;
procedure SetGroundInfo(Values:TGroundInfo);
protected
{ Protected declarations }
public
constructor Create (AOwner: TComponent); override;
destructor Destroy; override;
published
property tst:Ttst read Ftst write SetGroundInfo;
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('Standard', [TLabelView]);
end;
{构造}
constructor TLabelView.Create(AOwner:TComponent);
begin
inherited Create(AOwner);
end;
{析构}
destructor TLabelView.Destroy;
begin
inherited Destroy;
end;
{set ground information}
procedure TLabelView.SetGroundInfo(Values:TGroundInfo);
begin
Ftst.a := Values.a;
Ftst.b := Values.b;
Ftst.c := Values.c;
end;
end.
unit LabelView;
interface
uses
Windows, Messages, SysUtils, Classes, Controls, StdCtrls, Graphics;
type Ttst = Record {记录结构}
a:string;
b:string;
c:string;
end;
type
TLabelView = class(TLabel)
private
Ftst:Ttst;
procedure SetGroundInfo(Values:TGroundInfo);
protected
{ Protected declarations }
public
constructor Create (AOwner: TComponent); override;
destructor Destroy; override;
published
property tst:Ttst read Ftst write SetGroundInfo;
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('Standard', [TLabelView]);
end;
{构造}
constructor TLabelView.Create(AOwner:TComponent);
begin
inherited Create(AOwner);
end;
{析构}
destructor TLabelView.Destroy;
begin
inherited Destroy;
end;
{set ground information}
procedure TLabelView.SetGroundInfo(Values:TGroundInfo);
begin
Ftst.a := Values.a;
Ftst.b := Values.b;
Ftst.c := Values.c;
end;
end.