DELphi ListBox 条件删除的做法

TListBox的内容123456怎么做到发现 3的时候 然后删除只剩下 1和2即可
2025年03月01日 12:31
有1个网友回答
网友(1):

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