ListBox.InsertItemAt(int index, string newitem)
Inserts NEWITEM into the specified list box. The item will be inserted before
the specified index.
Listbox indexes go from 0 (the first item) to ItemCount - 1 (the last item). The new
item will be inserted before the index you specify.
NOTE: List boxes have a limit of 200 items. If you try to add more than that,
this function will return false and the item will not be added.
Example:
lstChoices.AddItem("First item");
lstChoices.AddItem("Second item");
lstChoices.InsertItemAt(1, "Third item");
will insert the Third Item in between the First and Second items.
See Also: ListBox.AddItem,
ListBox.RemoveItem
|