S
scansoft
Unregistered / Unconfirmed
GUEST, unregistred user!
try
if ListView1.Columns.Count > 0 then
begin
for j:=ListView1.Columns.Count-1 downto 0 Do
ListView1.Columns.Delete(j);
end;
if ListView1.Items.Count > 0 then
begin
for i:=ListView1.Items.Count-1 downto 0 Do
ListView1.Items.Item.Delete();
end; //删除当前选中行
except
ShowMessage('清除信息失败!请重试!');
end;
运行到这,就报错:exception class elisterror with message 'list index out of bounds(0)'
帮个忙啊!帮我看看怎么回事?
if ListView1.Columns.Count > 0 then
begin
for j:=ListView1.Columns.Count-1 downto 0 Do
ListView1.Columns.Delete(j);
end;
if ListView1.Items.Count > 0 then
begin
for i:=ListView1.Items.Count-1 downto 0 Do
ListView1.Items.Item.Delete();
end; //删除当前选中行
except
ShowMessage('清除信息失败!请重试!');
end;
运行到这,就报错:exception class elisterror with message 'list index out of bounds(0)'
帮个忙啊!帮我看看怎么回事?