unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
Taa = record
a0: Integer;
a1: String[50];
end;
type
TxxInfo = class(TObject)
private
Faa: Taa;
function Get_aa: Taa;
procedure Set_aa(Value: Taa);
public
published
property aa: Taa read Get_aa write Set_aa;
end;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
a: TxxInfo;
begin
a := TxxInfo.Create;
with a.aa do
begin
a0 := 1;
a1 := 'ddddd';
end;
showmessage(a.aa.a1);
a.Free;
end;
{ TxxInfo }
function TxxInfo.Get_aa: Taa;
begin
Result := Faa;
end;
procedure TxxInfo.Set_aa(Value: Taa);
begin
Faa := Value;
end;
end.