i am currently doing some programming in Borland C++ Builder 6.
I have 24 edit boxes(a visual component, with a text field) and i want to insert some values in the boxes, now i do it like this:
Edit1->Text=1;
Edit2->Text=2;
Edit3->Text=3;
...
Edit24->Text=24;
but i want to have something like this:
for(int i=1; i<25;i++){
Edit"i"->Text=i;
}
i think i have to make an array of objects or something.
Can any body help me with this? I don’t have a lot of experience with objects and stuff like that.
There is a
FindComponentfunction in VCL. It is used to find a component by it’s name.In your case it will look something like: