Hola Impadron.
No me queda muy en claro lo que buscas hacer, según esto:
Cita:
Necesito saber que Item el usuario seleccionó para agregarlo al DBEdit
|
Podria ser:
Código:
void __fastcall TForm1::CheckListBox1Click(TObject *Sender)
{
if(CheckListBox1->Checked[CheckListBox1->ItemIndex])
DBEdit1->Text = DBEdit1->Text +
CheckListBox1->Items->Strings[CheckListBox1->ItemIndex];
}
Pero según esto:
Cita:
realizar un ciclo desde el primer item hasta el ultimo y se verifique cuales están seleccionado y los agregue al DBEdit
|
Sería como te comentaron arriba:
Código:
for(int i=0; i < CheckListBox1->Count; i++)
if(CheckListBox1->Checked[i])
DBEdit1->Text = DBEdit1->Text + CheckListBox1->Items->Strings[i];
/* Limpiar la selección una vez agregados */
for(int i=0; i < CheckListBox1->Count; i++)
CheckListBox1->Checked[i] = false;
Saludos.