Page 90 - Computer Class 08
P. 90
Adding Combo Box in the Form
The Combo box is also used to display a list of items like a list box but with more options.
However, the user needs to click on the small arrowhead on the right or the combo box to
see the items which are presented in a drop-down list. In order to add items to the list, you
can also use the Addltem method.
Let’s
Let’s Learn...
Learn...
To add combo box in the form.
1. Click on ComboBox .
2. Drag and put it on the form window.
3. Double-click in Combo box.
The Form load () code window 3
appears.
1
4. Write the following code in the
windows.
Combo1.Addltem “Sunday”
Combo1.Addltem “Monday”
5
Combo1.Addltem “Tuesday”
Combo1.Addltem “Wednesday”
Combo1.Addltem “Thursday”
Combo1.Addltem “Friday”
Combo1.Addltem “Saturday”
5. To run this program, click on Start
button on the standard toolbar.
You will get the following output.
Computer-8 90