Registriert seit: 18. Apr 2005
Ort: Dresden
405 Beiträge
Delphi 2005 Professional
|
Re: Eine Schleife für die Labels mit Variablenzuordnung(Arra
3. Mai 2005, 16:08
Also so sieht der Spass ganz aus, wo ich die Labels einzeln angegangen bin(siehe oben) hats geklappt
Delphi-Quellcode:
begin
for i:=0 to 9 do
Counte[i]:=0;
for pl0 := Form1.Anzeige.count-1 DownTo 0 do
begin
if StrToInt(Form1.Anzeige.Items[pl0]) in [0,10,20,30] then
Counte[0] := 0
else Inc(Counte[0]);
if StrToInt(Form1.Anzeige.Items[pl0]) in [1,11,21,31] then
Counte[1] := 0
else Inc(Counte[1]);
if StrToInt(Form1.Anzeige.Items[pl0]) in [2,12,22,32] then
Counte[2] := 0
else Inc(Counte[2]);
if StrToInt(Form1.Anzeige.Items[pl0]) in [3,13,23,33] then
Counte[3] := 0
else Inc(Counte[3]);
if StrToInt(Form1.Anzeige.Items[pl0]) in [4,14,24,34] then
Counte[4] := 0
else Inc(Counte[4]);
if StrToInt(Form1.Anzeige.Items[pl0]) in [5,15,25,35] then
Counte[5] := 0
else Inc(Counte[5]);
if StrToInt(Form1.Anzeige.Items[pl0]) in [6,16,26,36] then
Counte[6] := 0
else Inc(Counte[6]);
if StrToInt(Form1.Anzeige.Items[pl0]) in [7,17,27] then
Counte[7] := 0
else Inc(Counte[7]);
if StrToInt(Form1.Anzeige.Items[pl0]) in [8,18,28] then
Counte[8] := 0
else Inc(Counte[8]);
if StrToInt(Form1.Anzeige.Items[pl0]) in [9,19,29] then
Counte[9] := 0
else Inc(Counte[9]);
(FindComponent('form1.Label'+IntToStr(i+192)) as TLabel).Caption:=IntToStr(Counte[i]);
end;
end;
@ freak4fun , nee das will auch nicht funken
|
|
Zitat
|