Visual Basic Concepts
Controls That Present Choices to Users
Most applications need to present choices to their users, ranging from a simple yes/no option to selecting from a list containing hundreds of possibilities. Visual Basic includes several standard controls that are useful for presenting choices. The following table summarizes these controls and their appropriate uses.
To provide this feature | Use this control |
A small set of choices from which a user can choose one or more options. | Check boxes |
A small set of options from which a user can choose just one. | Option buttons (use frames if additional groups are needed) |
A scrollable list of choices from which the user can choose. | List box |
A scrollable list of choices along with a text edit field. The user can either choose from the list or type a choice in the edit field. | Combo box |
Check boxes, option buttons, list boxes, and combo boxes are discussed in the following sections:
Selecting Individual Options with Check Boxes The basics of using the check box control.
Grouping Options with Option Buttons The basics of using the option button control.
Using List Boxes and Combo Boxes An introduction to the list box and combo box controls.
Using Scroll Bars as Input Devices A brief introduction to the scroll bar control.