I display each record from the database as a choice for the wxchoice control and it works fine.
The problem is that the number of records can increase and so it can exceed the number of default choices that I set for the wxChoice.
For the moment, I tried to set an higher number of choices in this way:
Code: Select all
Choice19 = new wxChoice(this, ID_CHOICE22, wxPoint(584,424), wxSize(224,104), 0, 0, 0, wxDefaultValidator, _T("ID_CHOICE22")); Choice19->SetSelection( Choice19->Append(_("Esercizio")) ); Choice19->Append(_("--")); Choice19->Append(_("--")); Choice19->Append(_("--")); Choice19->Append(_("--"));
For example, in the above code, if I retrieve more than 5 items from the database, I will get an error during the compiling because there are not enough pre-loaded choices.
I'm using wxSmith, CodeBlocks, C++, Windows 10, WxWdigets 3.1