VCL Delphi

Title: How to delete all selected items of a Listbox
procedure TForm1.Button1Click(Sender: TObject);
var
i: integer;
begin
for i := ListBox1.Items.Count - 1 downto 0 do
if ListBox1.Selected[i] then
ListBox1.Items.Delete(i);
end;