VB.NET:如何防止用户在ComboBox中输入 [英] VB.NET: how to prevent user input in a ComboBox
本文介绍了VB.NET:如何防止用户在ComboBox中输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何防止ComboBox中的用户输入,以便用户只能选择定义列表中的一个项目?
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?
推荐答案
将组合框的DropDownStyle属性设置为DropDownList。这将只允许选择列表中的项目,并且不允许任何自由格式的用户输入。
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.
这篇关于VB.NET:如何防止用户在ComboBox中输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文