Combobox中没有Dipplay [英] Dipplay none in Combobox

查看:71
本文介绍了Combobox中没有Dipplay的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在组合框中显示无

请建议我应该在代码中完成或者我可以设置组合框proplerties

How to display none in the combobox
please suggest me it should be done in the code or can i set the combo box proplerties

推荐答案

如果要在ComboBox中不显示任何内容,可以在属性面板中将文本属性设置为无。将其更改为无的另一种方法是在Form Load Event中添加以下行。

If you want to display none in ComboBox, in Properties Panel you can set Text Properties to none. The other way of changing it to none is by adding the below line in Form Load Event.
ComboBox1.Text = "none"



以上代码将帮助您在运行表单时不显示任何内容。但它不会显示在ComboBox的项目列表中。如果您希望它也显示在列表中,那么您可以右键单击ComboBox并单击Edit Items ...将打开一个新窗口。在那里的文本框中添加无。将无添加到列表中的其他方法是在表单加载事件中添加以下行。


The above code will help you to display none when you run your form. But it will not be displayed in the item list of your ComboBox. If your want it to be displayed in your list too, then you can right click on your ComboBox and click on Edit Items... A new window will get opened. Add none in the textbox there. Other way of adding none to the list is adding the below line in the Form Load Event.

ComboBox1.Items.Add("none")



希望这能满足您的提问。如果您仍有任何疑问,可以在评论中发布。


Hope this satisfy your question. If still you have any doubt you can post it in comments.


这篇关于Combobox中没有Dipplay的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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