I need to create a function where I step into the function a CheckListBox and this function will store in a variable the values of the checklistbox.
function PegaDescricao(checklistbox .......... ) : String;
var i, cont, descricao : Integer;
begin
cont := 0;
for i:=0 to checkListBox.Items.Count-1 do
begin
if cont = 0 then
begin
cont := contad +1;
descricao:=copy(checkListBox.Items.Strings[i],1,Length(checkListBox.Items.Strings[i])-4);
end
else
descricao:=descricao+', '+copy(checkListBox.Items.Strings[i],1,Length(checkListBox.Items.Strings[i])-4);
end;
end;