Control Choice - Do you use ComboBoxes instead of single-select List Boxes?

Updated by Brady Stroud [SSW] 1 year ago. See history

123

ComboBoxes are better than List Boxes **for data entry** because:

- They occupy less screen space
- They are less trouble to scroll through, owing to the fact that you can afford to have more room for the list (as it's collapsed most of the time)
- As you can see in the figures below, using a combo also makes the required field indicator (\*) easier to see.
<imageEmbed
  alt="Image"
  size="large"
  showBorder={false}
  figureEmbed={{
    preset: "badExample",
    figure: 'Bad Example - Using list boxes',
    shouldDisplay: true
  }}
  src="/uploads/rules/control-choice-do-you-use-comboboxes-instead-of-single-select-list-boxes/../../assets/ListBoxesAreEvil_SingleSelectBad.gif"
/>

<imageEmbed
  alt="Image"
  size="large"
  showBorder={false}
  figureEmbed={{
    preset: "goodExample",
    figure: 'Good Example - Using ComboBoxes - takes up less screen space and the required field indication is easy to see',
    shouldDisplay: true
  }}
  src="/uploads/rules/control-choice-do-you-use-comboboxes-instead-of-single-select-list-boxes/../../assets/ListBoxesAreEvil_SingleSelectGood.gif"
/>

**Note: When are single-select list boxes OK?**

As mentioned before, there are exceptions to this rule. It would be hard to imagine the Include/Exclude boxes in the SQL Server Enterprise Manager's Server Registration Wizard being handled with ComboBoxes, for example.


<imageEmbed
  alt="Image"
  size="large"
  showBorder={false}
  figureEmbed={{
    preset: "default",
    figure: 'Include/Exclude Listboxes are an example of a valid use for List Boxes',
    shouldDisplay: true
  }}
  src="/uploads/rules/control-choice-do-you-use-comboboxes-instead-of-single-select-list-boxes/../../assets/ListBoxesAreEvil_ExceptForThisOne.gif"
/>

| We have a program called [SSW Code Auditor](http://www.ssw.com.au/ssw/CodeAuditor/) to check for this rule. |
| ----------------------------------------------------------------------------------------------------------- |
acknowledgements
related rules