现在有6个image(image1-image6),要装载query中的图片,但是query中记录数不定(<=6).比如有三条记录,就在image1-3中装载他.现在问题是我不能确定哪张图片.也就是比如image1,我该如何用i来确定他呢.for i=0 to recordcount-1 do showphoto(image[i]);//这个image[i]怎么办end
调试欢乐多
image:Timage;
i:integer;
begin
for i:=0 to recordcount-1 do
begin
image:=Timage(self.FindComponent('image'+inttostr(i)));
showphoto(image);
end;
image:Timage;
i:integer;
begin
for i:=0 to recordcount-1 do
begin
image:=Timage(self.FindComponent('image'+inttostr(i)));
showphoto(image);
end;
i: integer;
begin
for i : =0 to recordcount - 1 do
begin
for i := 0 to self.componentcount - 1 do
if self.components[i].name = 'image'+inttostr[i] then
showphoto(image[i]);
end;
怎么回事??