Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by HeZa,
16. Apr 2010
Wunderbar :-)
TCustomMyComp = class(TCustomControl)
...
public
...
property Items: TMyItemList read FItems write FItems; // incl. write, nicht wie im 1. Beitrag ohne
end;
Und die Eigenschaft Items, steht nicht im published Teil? Hmm...
Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by HeZa,
16. Apr 2010
@Andreas:
Doch, so sollte das gemacht werden (siehe z.B. THeaderSection in ComCtrls).
Das ist allerdings richtig. :-)
Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by HeZa,
16. Apr 2010
Ich sehe gerade noch, die Funktion Add (ohne Parameter) sollte auch den Rückgabetyp TMyItem haben. Also so:
function Add: TMyItem; overload;
Viel Spaß
Ciao HeZa
Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by HeZa,
16. Apr 2010
du brauchst noch eine private variable FOwner vom Typ TComponent in TMyItemList und musst dann noch die beiden nachfolgenden Prozeduren wie folgt überschreiben.
constructor TMyItemList.Create(AOwner: TComponent);
begin
inherited Create(TOurCollectionItem);
FOwner := AOwner;
end;
function TMyItemList.GetOwner: TPersistent;
begin