For i:=o to CheckListBox1.Items.Count-1 do begin if CheckListbox1.Checked[i] then
//处理选中项 end;
Var i,j:Integer; CheckArr:Array[0..128] of Strign;...j:=0;For i:=0 to CheckListBox1.Items.Count-1 do begin if CheckListbox1.Checked[i] then begin CheckArr[j]:=CheckListbox1.Items[i]; Inc(j); end;
CheckListBox1.Items[CheckListBox1.ItemIndex]就是选中的Items值
begin
if CheckListbox1.Checked[i] then
//处理选中项 end;
i,j:Integer;
CheckArr:Array[0..128] of Strign;...j:=0;For i:=0 to CheckListBox1.Items.Count-1 do
begin
if CheckListbox1.Checked[i] then
begin
CheckArr[j]:=CheckListbox1.Items[i];
Inc(j);
end;
end;执行完成后,选中项的字符就保存在数组CheckArr中了。