...delete all selected items of a Listbox?

Author: Rainer K├╝mmerle
Homepage: http://www.thinklazy.de

Category: VCL

procedure TForm1.Button1Click(Sender: TObject);
var
  
i: integer;
begin
  for 
i := ListBox1.Items.Count - 1 downto do
    if 
ListBox1.Selected[i] then
      
ListBox1.Items.Delete(i);
end;

 

printed from
www.swissdelphicenter.ch
developers knowledge base