Registriert seit: 10. Jun 2002
Ort: Unterhaching
11.412 Beiträge
Delphi 12 Athens
|
Re: Komponente mit Lines erstellen
17. Sep 2003, 16:37
Viel einfacher...
Delphi-Quellcode:
type
TMeineKompo = class(TComponent)
private
FLines: TStringList;
procedure SetLines(Value: TStringList);
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
published
property Lines: TStringList read FLines write SetLines;
end;
....
constructor TMeineKompo.Create(AOwner: TComponent);
begin
inherited;
FLines := TStringList.Create;
end;
destructor TMeineKompo.Destroy;
begin
FLines.Free;
inherited;
end;
procedure TMeineKompo.SetLines(Value: TStringList);
begin
FLines.Assign(Value);
end;
Fertig
...  ...
Daniel Lizbeth Ich bin nicht zurück, ich tue nur so
|