Link to home
Start Free TrialLog in
Avatar of Dark_King
Dark_King

asked on

Tlistbox

I want to delete selected items in a list box.


for i := 0 to (ListBox1.Items.Count - 1) do begin
  try
    if ListBox1.Selected[i] then
    begin

  //  I want do remove selected items in this list box here
// is I on the right track or not.
// I now the delete function is not here it is watt I need from you.
    end;
 finally
   
   end;
ASKER CERTIFIED SOLUTION
Avatar of edey
edey

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Epsylon
Epsylon

or

var i: Integer;
begin
  for i := ListBox1.Items.Count - 1 downto 0 do
    if ListBox1.Selected[i] then
      ListBox1.Items.Delete(i);
end;