Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there any way to turn a group of images into an array?

Status
Not open for further replies.

jvff

Programmer
Apr 1, 2001
64
BR
Hello,
I've got 300 images called Image1, Image2... Image300. Is there any way to make an array so that I may use:

Image[SpinNum1->Value]->Picture->LoadFromFile("b.bmp");

instead of a 2 huge switches ( I am already using
switch(EditChosenChar->Text) ). ThanQ. ThanQ, ;-)

JVFF (Janito Vaqueiro Ferreira Filho)
 
I found the answer. Declare TImage *image[400]; at the public: part of Form1 then at Form1's constructor do
image[0] = Image1;
...
image[399] = Image400; ThanQ, ;-)

JVFF (Janito Vaqueiro Ferreira Filho)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top