Hi,
You could set the Tag property of the TImage component, and then add the following function the form:
function TForm1.FindImageByIndex(In
var
I: Integer;
begin
Result := NIL;
i := 0;
while (Result = NIL) and (I < ComponentCount) do
begin
if (Components[I] is TImage) and (Components[I].Tag = Index) then
Result := TImage(Components[I]);
inc(i);
end;
end;
Then you can call this function, passing the required index number (which matches the Tag property), and it will return the matching TImage component.
Cheers,
Paul
Main Topics
Browse All Topics





by: ExtasePosted on 2004-06-10 at 10:15:18ID: 11281650
try to use an ImageList component(TImageList) instead.