Tema: Delphi y OO
Ver Mensaje Individual
  #6  
Antiguo 02-03-2011
[coso] coso is offline
Miembro Premium
 
Registrado: may 2008
Ubicación: Girona
Posts: 1.678
Reputación: 0
coso Va por buen camino
Hola paolo,

no te he acabado de entender, pero si lo que quieres es crear una propiedad tipo TStrings se hace de este modo


Código Delphi [-]

type ...

private
 SS : TStrings;
...
protected SetSS(s : TStrings);
...
published
 property MiStrings : TStrings read SS write SetSS;

end;

...
implementation
...

constructor MiClase.Create(AOwner : TComponent);
begin
inherited Create(AOwner);
SS := TStringList.Create;
...
end;

destructor MiClase.Destroy;
begin
SS.Free;
end;

procedure SetSS(S : TStrings);
begin
SS.Assign(S);
end;

Hay algo en la ayuda de Delphi, por si he puesto algun error. Un saludo.
Responder Con Cita