From: "Zhitomirsky Mark"
--
Mark Zhitomirsky, Saratov. Zhitom@mail.saratov.ru
> Hi all !
>
> Does anyone know how to delete all selected items in a Tlistbox ?
> Please write the code so i understand !
>
> // Dowert
Hi!
Get it! I didn`t check it, but I sure that next code will work:
procedure TForm1.Button1Click(Sender: TObject);
var
i: integer;
begin
with ListBox do begin
for i:=Items.Count-1 downto 0 do begin
if selected[i] then Items.delete(i);
end;
end;
end;
Bye-bye.
Mark.
--- ifmail v.2.10
---------------
* Origin: unknown (2:5053/16@fidonet)
|