Модератор: Модераторы
type
TMyProps=class(TPersistent)
published
property My1: ....
property My2: ....
end;
TMyComp = class(Tcomponent)
published
...
property MyProps: TMyProps;
end;
Mr.Smart писал(а): TMyProps=class(TPersistent)
published
property My1: ....
property My2: ....
end;
type
TMyComp = class;
TMyProps=class(TPersistent)
private
fComp: TMyComp;
procedure SetMy1(const aVal: ...);
published
property My1: .... write SetMy1;
end;
TMyComp = class(Tcomponent)
private
procedure Invalidate;
published
...
property MyProps: TMyProps read fMyProps write fMyProps;
public
constructor Create(aOwner: TComponent); override;
end;
procedure TMyComp.SetMy1(....;
begin
...
fComp.Invalidate;
...
end;
constructor TMyComp.Create(aOwner: TComponent);
begin
inherited;
fMyProps:=TMyProps.Create;
fMyProps.fComp:=self;
end;
Сейчас этот форум просматривают: Yandex [Bot] и гости: 254