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

前端 未结 9 684
[愿得一人]
[愿得一人] 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:31

    Seeing a user banging away at a control that overrides her decisions is a sad sight. Set the control's Enabled property to False. If you don't like that then change its Items property so only one item is selectable.

提交回复
热议问题