Marcin Borkowski wrote:
If you don't know answer 4 my question, don't post, please.
This is not the shop with help.
You should ask this question on Borland's newsgroups.
You can sign up at (hold on while I google for
"Borland newsgroups", just a second ... )
http://info.borland.com/newsgroups/ng_cbuilder.html
I don't have Builder installed so I can't look this stuff
up in the help files or test my code. You'll gave to check
the details yourself.
// Put these declarations in the 'TForm1' class
// in the 'Unit1.h' file.
TComboBox * ComboBoxes [4];
void __fastcall FillComboBoxes (AnsiString s);
struct EFillComboError { };
// Put this in the 'TForm1' constructor in 'Unit1.cpp'.
ComboBoxes [0] = ComboBox1;
ComboBoxes [1] = ComboBox2;
ComboBoxes [2] = ComboBox3;
ComboBoxes [3] = ComboBox4;
// Put this definition in 'Unit1.cpp'.
void __fastcall TForm1::FillComboBoxes (AnsiString AString)
{
std::auto_ptr <TStringList> StringList (new TStringList);
StringList->Delimiter = "|"; // ?? Check in help.
StringList->DelimitedText = AString;
if (StringList->Count != 4) throw EFillComboError ();
for (int i = 0; i != 4; ++ i)
ComboBoxes [i]->Text = StringList->Strings [i];
}