在的WinForms只读组合框 [英] Readonly ComboBox in WinForms
本文介绍了在的WinForms只读组合框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我写在C#中的图形用户界面,Visual Studio 2008中,使用设计和WinForms。我有一个组合框控件,我想它,只允许从提供的选项中进行选择,而不是接受用户输入的字符串。它似乎并不具有只读属性,并禁用它阻碍了控制的可读性(以及不允许用户选择)。
I'm writing a GUI in C#, Visual Studio 2008, using the Designer and WinForms. I've got a ComboBox control, and I'd like it to only allow to select from the provided options and not to accept a user-entered string. It doesn't appear to have a ReadOnly property, and disabling it hinders the readability of the control (as well as disallowing user-selection).
推荐答案
设置DropDownStyle为DropDownList的
Set DropDownStyle to "DropDownList"
这篇关于在的WinForms只读组合框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文