比如我定义了类
type
MyClass=class
b:=integer;
end;
a1,a2,a3,a4....an:MyClassfor i:=1 to n do
a(i).b:=1; 类视于这样的方式来处理
控件的话可以用
timage(findcomponent('image' + inttostr(i))).Picture.。
type
MyClass=class
b:=integer;
end;
a1,a2,a3,a4....an:MyClassfor i:=1 to n do
a(i).b:=1; 类视于这样的方式来处理
控件的话可以用
timage(findcomponent('image' + inttostr(i))).Picture.。
type
MyClass=class
b:integer;
end;
var
a: array [1..n] of MyClass;for i:=1 to n do
a[i].b:= 1;顺便提一句,记得对象要Create
for i:=0 to List.Count-1 do
MyClass(List[i]).b:= 1;