I need create 70 wxChoice; Then, I have a idea to do something like this ( it's only a idea):
first, of corse, is it possible generate them dynamically, in Runtime?
Code: Select all
for (int i = 1, i < 70, i++)
{ wxChoice* Choice(i) = new wxChoice(panel, ID_Choice(i), wxDefaultPosition, wxDefaultSize);
Choice(i)->Append(wxT("one"));
Choice(i)->Append(wxT("two"));
}
// or this:
for (int i = 1, i < 70, i++)
{
wxArrayString strings(i);
strings(i).Add(wxT(“One”));
strings(i).Add(wxT(“Two”));
wxChoice* Choice(i) = new wxChoice(panel, ID_Choice(i), wxDefaultPosition, wxDefaultSize, strings(i));
}