habe es jetzt so gemacht
Delphi-Quellcode:
type
TForm6 = class(TForm)
Label1: TLabel;
Button1: TButton;
ListView1: TListView;
procedure Label1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
mycb:Array of TCheckbox;
procedure mycbClick(Sender: TObject);
{ Public-Deklarationen }
end;
var
Form6: TForm6;
implementation
{$R *.dfm}
Procedure freeall;
Var L1,cnt1:integer;
begin
L1:=Length(Form6.mycb);
for cnt1 := 0 to L1 - 1 do
freeandnil(Form6.mycb[cnt1]);
end;
procedure TForm6.Label1Click(Sender: TObject);
var
L1: integer;
begin
L1:=Length(mycb);
Setlength(mycb,L1+1);
mycb[L1]:= TCheckbox.Create(Form6);
try
with mycb[L1] do
begin
Parent := ListView1;
Top := 27;
Left := 16;
Height := 17;
Width := 97;
Caption:= 'Klicken zum Eintragen';
Name:= 'mybox';
end;
except freeall
end;
end;
end.
er zeigt mir aber an:
[DCC Fehler] Aufgabenzettel.pas(15): E2065 Ungenügende Forward- oder External-Deklaration: 'TForm6.mycbClick'