if (Item.SubItems.Text='') and (Item.SubItems.Text='') and (Item.SubItems.Text='')
and (Item.SubItems.Text='') and (Item.SubItems.Text='')
then begin
ListView1.RowSelect:=True;
ListView1.Items[6].Selected:= true;
ListView1.Selected.Free;
end;
Вылетает окно с ошибкой (Access violation at address 004754E7 in module 'Project1'...)
UPD
По следующему варианту просто никакой реакции:
For i := 0 to ListView1.Items.Count-1 do begin
if ListView1.Items.Item[i].Caption='' then
ListView1.Items.Item[i].Delete
end
UPD 2
На вид все получилось, строка визуально пропадает но при сохранении в ini строка восстанавливается или не пропадает вовсе:
j:=1;
For i := 0 to ListView1.Items.Count-1 do begin
if ListView1.Items[i].SubItems[j]='' then
ListView1.Items.Item[i].Delete
end