in form create...
Code:
var Stapel:array[1..21] of TLabel;arr1:array[1..7] of Tlabel;arr2:array[1..7] of Tlabel;arr3:array[1..7] of Tlabel;
i,j,k : integer;
begin
for i:=1 to 3 do begin
for j:= 1 to 7 do begin
if i= 1 then
arr1[j]:=TLabel.Create(Form1);
if i = 2 then
arr2[j]:=TLabel.Create(Form1);
if i = 3 then
arr3[j]:= TLabel.Create(Form1);
end;
end;
for k:=1 to 7 do begin
with arr1[k] do begin
caption:=inttostr(k*3-2);
Parent:=Form1;
height:=100;
width:=50;
left:=100;
top:= k*50;
end;
with arr2[k] do begin
caption:=inttostr(k*3-1);
Parent:=Form1;
height:=200;
width:=50;
left:=200;
top:= k*50;
end;
with arr3[k] do begin
caption:=inttostr(k*3);
Parent:=Form1;
height:=100;
width:=50;
left:=300;
top:= k*50;
end;
end;
und dann ordne ich sie auf click neu an in den arrays... nun will ich das aber die neue ordnung auch wieder enue positionen hervorruft...