Visual Basic 2008 Programming: Business Applications with a Design Perspective
Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9
Chapter 10 Chapter 11 Chapter 12 Chapter 13 Chapter 14 Appendix A Appendix B Appendix C Home
Last change: February 13 2016 18:48:19.

 Chapter in PDF

Table of Contents

Chapter 3: User Interface Design: Visual Basic Controls and Events
Last change: February 13 2016 18:47:26.

3.4 Longer List of Known Items: List Boxes and Combo Boxes

A principle that was implicitly stated in the preceding section is that whenever the expected data are known with a limited number of items, your program should provide these items for the user to select, rather than prompting the user to enter (into a text box, for example). Such design reduces the number of keystrokes, thus enhancing the data-entry accuracy and efficiency. In addition, there won’t be a need to check for entry errors, thus making the program simpler and faster.
What if the number of known items is not just a few, but quite a few? For example, a college can have a large number of departments, but the departments are known and seldom change. Using radio buttons to identify a department may not sound practicable, but you should still resist the use of text boxes for this purpose. The data that the user enters can contain errors. Furthermore, it can take the user many keystrokes to complete the entry. One possible solution is to use data codes—call it department ID—in place of the complete department names. Your program will still need to verify the accuracy of entered data, however, even though such a design should reduce the number of keystrokes. A good solution is to use the list box or combo box.

Last change: February 13 2016 18:47:27.
  1. The Radio Button
  2. Check Boxes for Independent Choices
  • 3.4 Longer List of Known Items: List Boxes and Combo Boxes
    1. The List Box
    2. The Need for the Combo Box
    3. <<PreviousNext>>