Checklist Box Delphi how to get the Item String checked

Asked

Viewed 1,663 times

1

I’m having a problem with how to get the Checklistbox string that is selected. how can I solve the problem

var   
 setores : array of string

    for I := 0 to auditoriaDeEPIFrm.lckCheck.Items.Count - 1 do
    begin
      if auditoriaDeEPIFrm.lckCheck.Checked then
        setores[i] := recebe a string do que esta selecionado;


    end;

1 answer

2


var
  iCont: Integer;
  sValor: string;
begin
  for iCont := 0 to CheckListBox1.Count-1 do
  begin
    if CheckListBox1.Checked[iCont] then
      sValor := CheckListBox1.Items[iCont].Trim;
  end;
end;

I hope I’ve helped

Browser other questions tagged

You are not signed in. Login or sign up in order to post.