怎麼把Listview中的記錄前checkbox打鉤的記錄選出來

procedure   TForm1.Button1Click(Sender:   TObject);
var
I:   Integer;
begin
        Caption:='';
        For   i:=   0   to   ListView1.Items.Count-1   do
        begin
                if   ListView1.Items[i].Checked   then
                        Caption:=Caption+ListView1.Items[i].Caption+',';
        end;
end;

--------------------------------------------------------------------------------------------------------------------

var     i:   Integer;
begin
    For   i:=   0   to   ListView1.Items.Count-1   do
        begin
            if   ListView1.Items[i].Checked   then
                  showmessage(ListView1.Items[i].Caption);
        end;
end;

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章