ImgList[1] := Image1;
ImgList[2] := Image2;
ImgList[3] := Image3;
ImgList[4] := Image4;
ImgList[5] := Image5;ImgList是TImage数组
ImgList: array [1..5] of TImage;
Image1是Image,
我能通过循环来实际吗?
ImgList[2] := Image2;
ImgList[3] := Image3;
ImgList[4] := Image4;
ImgList[5] := Image5;ImgList是TImage数组
ImgList: array [1..5] of TImage;
Image1是Image,
我能通过循环来实际吗?
mnComponent: TComponent;
begin
for i := 1 to 5 do
begin
mnComponent := FindComponent('Image' + IntToStr(i));
if mnComponent <> nil then
ImgList[i] := TImage(mnComponent);
end;