组合框单击Windows窗体应用程序中的事件 [英] Combo box Click Event in windows form application

查看:105
本文介绍了组合框单击Windows窗体应用程序中的事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用visual studio 2010.现在我创建了一个简单的项目。在这个项目中我使用的是组合框(下拉框)。当我单击箭头时,它只显示项目列表。但我想,如果点击组合框中的任何地方,它应该在组合框中显示项目列表。

有可能吗?如果有可能,请指导我..





当我们点击组合框箭头按钮时,它会显示列表项。但我想在哪里点击组合框(不仅是箭头)我想要显示列表项目。

现在你能理解吗?抱歉,我的英语很弱。





提前致谢。

Hi,
I am using visual studio 2010. Now i have create simple project. In this project i am using combo box(Drop down box). When i click the arrow then only it shows the list of items. But i want, if click anywhere in the combo box, it should show the list of items in combo box.
Is it possible? If it is possible means please guide me..


When we click the combo box arrow button it show the list items. But i want where ever click in the combo box(Not only the arrow) i want show the list items.
Now can you understand? Sorry i am very weak in English.


Thanks in advance.

推荐答案





这很简单,只需从<$ c $更改ComboBox DropDownStyle 属性c>属性窗口下拉列表
private void Form1_Load(object sender, EventArgs e)
       {
           comboBox1.DropDownStyle=ComboBoxStyle.DropDownList;
       }


这篇关于组合框单击Windows窗体应用程序中的事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆