I have a screen with ten Images on a form which are Image1, Image2, etc. However, since I do not always fill them all, I want to be able to access them using a integer variable (i.e Image[curnoofimages + 1]). If I did this I could just copy the array off to each image at the end to the rountine.
However, when I try to do anything with the array of TImage, I get access violations. Is there a way to prevent this or is there a way to get each TImage of the form itself set up into an array?
As an additional question, is it possible to get an array of commands so I can access them by an integer variable (i.e. command := Subrountine1())? For this I figure I can at least call a subroutine with a case statement that executes the commands but with the Image I can't think of a way to have a subroutine's return value telling me which Image to use, so I end up with 10 case statements that are 20 long in the same rountine.
I hope that this all made sense and I hope I am just missing the obvious as usual.
However, when I try to do anything with the array of TImage, I get access violations. Is there a way to prevent this or is there a way to get each TImage of the form itself set up into an array?
As an additional question, is it possible to get an array of commands so I can access them by an integer variable (i.e. command := Subrountine1())? For this I figure I can at least call a subroutine with a case statement that executes the commands but with the Image I can't think of a way to have a subroutine's return value telling me which Image to use, so I end up with 10 case statements that are 20 long in the same rountine.
I hope that this all made sense and I hope I am just missing the obvious as usual.