Ja, bei Instanzen von TObject(-Nachfolgern) sind immer Zeiger im Spiel.
Bei Records kann man sich so behelfen:
Delphi-Quellcode:
type
TStyle = class
private
FSize : TPoint;
function GetSize: PPoint;
public
property Size: PPoint read GetSize;
end;
function TStyle.GetSize: PPoint;
begin
Result := @FSize;
end;
procedure Test;
var
style : TStyle;
begin
style := TStyle.Create;
style.Size.x := 10;
style.Size.y := 20;
style.Size^ := Point(30, 40);
style.Free;
end;
Gruß Hawkeye