i:=0;while i if ListBox1.Items[i]='3' then begin while i ListBox1.Items.Delete(i); break; end; Inc(i);end;