Computer Science, asked by shhshshvfgsvsg, 1 year ago

___________ method is used to delete items from a listbox.

1. remove
2. clear
3 . remove item
4. delete​

Answers

Answered by franktheruler
2

Answer:

In visual Basic 6, RemoveItem method is used to delete items from the listBox.

Explanation:

For deleting an item from the list, first you have to find its position, which is index, in the list. Then you have to use the  RemoveItem method.

The syntax of the method is as follows:

        list. RemoveItem index

Here, the index  is the order of the item to be removed.

Difference between the clear method and RemoveItem method:

The clear method removes all the items from the list. On the other hand, RemoveItem method just removes particular item from the list .

Answered by aqibkincsem
1

Answer:

Option 1, i.e. remove  is the correct word  to be filled in.So the complete sentence is :. ___Remove _______ method is used to delete items from a list box. Following procedure to be followed : if you want to delete the item with the same index in both list boxes (even if they have different value, you can use Remove At. public void Main Form Load (object sender, Event Args e) {list Box 1. Items. Clear () ;list Box 1. Items. Add Range (new [] {"a", "b", "c"}); list Box 2. Items. Clear () ; list Box 2. Items. Add Range (new [] {"d", "e", "f"});} public void Button 2 Click (object sender, Event Args e){int index = list Box 1. Selected Index ; list Box 1. Items. Remove At (index) ; list Box 2. Items. Remove At (index);}

Explanation:

Similar questions