Multiple choice .net

Which value for the ComboBox DropDownStyle property allows a user to type in data?

  1. DropDown

  2. DropDownSimple

  3. DropDownList

  4. Both a and b.

  5. All of the above.

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The DropDownStyle property of a ComboBox control determines the style of the control. It can be set to one of three values: DropDown, DropDownList, or Simple.

  • DropDown: This is the default style. It displays a text box and a drop-down list. Users can type in the text box and the drop-down list will display the options that match what they have typed.

  • DropDownList: This style displays a drop-down list only. Users cannot type in the text box.

  • Simple: This style displays a text box only. Users can type in the text box, but there is no drop-down list.

Therefore, the correct answer is A, DropDown, because this style allows the user to type in the text box and provides a drop-down list of options.

AI explanation

DropDown is correct. The Windows Forms ComboBox's DropDownStyle property has three values: Simple (text box always visible with an always-open list beneath), DropDown (the default — an editable text box where the user can type a value or click the arrow to choose from the list), and DropDownList (a non-editable, list-only box where typing is disabled and only selection from the list is allowed). Since the question asks which style allows typing, DropDown is the one that keeps the text portion editable; DropDownList explicitly blocks typing, so it's the clear wrong choice, and "DropDownSimple" isn't a real DropDownStyle value.