JavaScript Editor JavaScript Editor     JavaScript Debugger

Previous Section Next Section

Main Page

Removing Items from a Combo Box

Just as with list boxes, you can remove items from combo boxes using the Items.Remove and Items.RemoveAt methods. You just pass the object to remove to Items.Remove of the index of the item you want to remove from the combo box's list to Items.RemoveAt.

Here's an example. In this case, I'll remove item 1 in the list this way:

Private Sub Button1_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs)
End Sub

You should note that removing an item from a combo box changes the indices of the remaining items. After you remove item 1 in the above example, item 2 now gets index 1, and item 3 gets index 2.

Previous Section Next Section

JavaScript Editor Free JavaScript Editor     JavaScript Editor