VB.NET: how to prevent user input in a ComboBox

前端 未结 9 591
[愿得一人]
[愿得一人] 2021-02-03 17:05

How do you prevent user input in a ComboBox so that only one of the items in the defined list can be selected by the user?

9条回答
  •  说谎
    说谎 (楼主)
    2021-02-03 17:54

    Set the DropDownStyle property of the combobox to DropDownList. This will allow only items in the list to be selected and will not allow any free-form user input.

提交回复
热议问题