TIP: Click on subject to list as thread! ANSI
echo: delphi
to: ALL
from: ZHITOMIRSKY MARK
date: 1997-12-22 00:58:00
subject: Tlistbox

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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.