1
For that we will go all the way TCheckListBox
looking for the marked items, and we add one by one in the TListBox
.
Follows procedure:
void __fastcall frmTeste::btnTesteClick(TObject *Sender)
{
ListBox1->Clear(); //Limpando a Lista
for (int i = 0; i < CheckListBox1->Count; i++)
{
if (CheckListBox1->Checked[i]) //Para cada 1 que estiver maarcado...
ListBox1->Items->Add(CheckListBox1->Items->Strings[i]); //...Adiciona na lista
}
}
I had tried this way, but he won’t let me use the Checklistbox in my button event. Error: Undefined Symbol 'clbGabarito'. NOTE: clbGabarito is my checklistbox.
– Jeferson Leonardo
Put your code to the question!
– Junior Moreira