begin
with rzlistview1 do
begin
Columns.Add;
Columns.Add;
Columns.Add;
//ViewStyle:=vsreport;
GridLines:=true;
columns.items[0].caption:='进程名';
columns.items[1].caption:='进程ID';
columns.items[2].caption:='进程文件路径';
Columns.Items[0].Width:=100;
Columns.Items[1].Width:=100;
Columns.Items[2].Width:=150;
end;
//增加记录
with rzlistview1.items.add do
begin
caption:='2008-8-8';
SubItems.Add('233');
SubItems.Add('ww');
end;
with rzlistview1.items.add do
begin
caption:='2008-2-8';
SubItems.Add('111');
SubItems.Add('w743');
end;
with rzlistview1.items.add do
begin
caption:='2008-4-8';
SubItems.Add('666');
SubItems.Add('w2365');
end;
rzlistview1.CheckBoxes := true;
end;
var
i : integer;
begin
for i := 0 to rzlistview1.Items.Count -1 do
begin
if rzlistview1.Items[i].Checked then
begin
showmessage( rzlistview1.Items[i].SubItems.Strings[0] );
showmessage( rzlistview1.Items[i].SubItems.Strings[1] );
end;
end;
end;
end.