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;
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
var i: Integer;
begin
for i := ListBox1.Items.Count - 1 downto 0 do
if ListBox1.Selected[i] then
ListBox1.Items.Delete(i);
end;