CheckList Box Delphi how to get the Item String that is checked

1

I'm having a problem getting 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;
    
asked by anonymous 06.04.2017 / 16:05

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 have helped

    
06.04.2017 / 17:25