puuh^^
Das ist mein momentaner Code:
Delphi-Quellcode:
procedure TForm1.Button2Click(Sender: TObject);
var
i:Integer;
begin
TestForm:=TForm.Create(Self);
TestForm.ClientHeight:=1200;
TestForm.ClientWidth:=700;
for i := 0 to CheckListBox1.Items.Count-1 do
if CheckListBox1.Checked[i] then
begin
TestFrame:=TFrame4.Create(Self);
TestFrame.Name:=''+(CheckListBox1.Items[i]);
TestFrame.Top:= Random(1200);
TestFrame.Parent:=TestForm;
TestFrame.Show;
TestForm.Show;
//ShowMessage(checklistbox1.Items[i]);
end;
end;
So würd ich meinen in den geposteten einbinden:
Delphi-Quellcode:
procedure TForm1.Button2Click(Sender: TObject);
var
i, FormCount: Integer;
iItems: Integer;
begin
for i := 0 to (TestForm.ComponentCount - 1) do
begin
if (TestForm.Components[i].ClassName = 'TestFrame') then
begin
Inc(FormCount) ;
end;
end;
if (FormCount < 10) then
begin
TestFrame:=TFrame4.Create(Self);
TestFrame.Name:=''+(CheckListBox1.Items[i]);
TestFrame.Top:= Random(1200);
TestFrame.Parent:=TestForm;
TestFrame.Show;
end
else
begin
Formular drucken
Formular leeren
Formular neu füllen
end;
end;
aber wo bringe ich den Code unter???:
Delphi-Quellcode:
begin
TestForm:=TForm.Create(Self);
TestForm.ClientHeight:=1200;
TestForm.ClientWidth:=700;
for i := 0 to CheckListBox1.Items.Count-1 do
if CheckListBox1.Checked[i] then