We can use several methods to fill a listbox & combobox. If we know the list contents at design time and list never changes , we define list item in properties window.The list property holds the list of items for a listbox or combobox. To define the List property at design time, select the control and scroll the properties window to the List property.
Click on the down arrow to drop down the empty list and type our first item. Then press Ctrl + Enter to move to the next list item. Continue typing items and pressing Ctrl + Enter until we r finishe. On the last list item , do not press Ctrl + Enter or we will have an extra (blank item) on the list.
For adding items to the list during program execution , we will use the AddItem method in an event procedure. Syntax is as follows :
Object.addItem value (index)
Ex. lstSubject.addItem “VB”
lstSubject.addItem txtSubject.text