(Formerly known as ListBoxRemove, which is now obsolete)
ListBox.RemoveItem(int item)
Removes ITEM from the specified list box. ITEM is the list index of the item to
remove, starting with 0 for the top item.
If you want to remove all items from the list, then use ListBox.Clear
instead.
NOTE: Calling this function causes other items in the list to get re-numbered, so
make sure you don't keep around any references from ListBox.SelectedIndex and related functions
while using this command.
Example:
lstTest.AddItem("First item");
lstTest.AddItem("Second item");
lstTest.RemoveItem(0);
the list box will now just contain "Second item".
See Also: ListBox.Clear, ListBox.FillDirList
|