Help! I'm writing a program using Borland C++ Builder version 5.0 with a large number of ComboBoxes (about 120). I'm trying to use ComboBox in a "for" loop to set the ItemIndex of each box to the values in a specific array.

Example Code:

...
...
for (x=0;x<120;x++)
{
ComboBox[x]->ItemIndex=array[y];
}
...
...

Unfortunately, Borland won't allow this. Several error messages are produced when compiled such as "ComboBox[x]" not recognized or something along those lines. Is there a way to initialize a group of ComboBoxes using this format or is there a different way? If not, does a later version of Borland C++ Builder support this?

What has the documentation got to say about Combo boxes in Borland?