在程序中,选中然后:
var i:integer;
begin
for i:=listview1.selcount-1 downto 0 do
listview1.selected.delete;
end;
指定:
with listview1 do
begin
items.clear;//全部删除
selected.delete;//删除当前所选的ITEM
items.delete;//指定ITEM INDEX删除
end;
如果是判断caption的值,然后再删除:
var i:integer;
begin
for i:=listview1.selcount-1 downto 0 do
if listview1.items.caption = 'temp' then
listvie21.item.delete;
end;