listbox2.items.Delete[listbox2.itemindex]; lazarus / 10-Designer ---------------------------------------------------------------------- cazzajay · 2009-12-13 12:16 this doesnt work its probably something really obvious but how do i delete the selected line item from a tlistbox i tried  listbox2.items.Delete[listbox2.itemindex];  and listbox2.items[listbox2.itemindex].delete; but for the first example i get a missing parameter error and the second i get illegal qualifier error. the listbox is sorted alphabetically so ideally id like to "refresh" the box after deleting so that the line i delete doesn't leave a gap any ideas on how to accomplish this feat? thankee cj ---------------------------------------------------------------------- Mike J · 2009-12-13 13:35 Mayhaps:   ListBox1.Items.Delete(INDEX);   I did a [CTRL-SPACE] at the end of ListBox1.Items.  then scrolled through the results, noticed there was a delete that requires an INDEX. ---------------------------------------------------------------------- theo · 2009-12-13 15:06 ListBox2.Items.Delete(ListBox2.ItemIndex); ---------------------------------------------------------------------- cazzajay · 2009-12-14 00:44 thanks guys i knew the solution was something simple!