我怎样才能“删除”组合框的细节? [英] How can i "remove" the details of combobox?
本文介绍了我怎样才能“删除”组合框的细节?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好!
如何删除comboBox的详细信息?
***我正在获取详细信息我的数据库进入组合框
我试过这段代码:
comoboBox1.text =
comoboBox1.text = 0
我的comboBox包含,例如此字符串=QWE
当我在这里尝试这个代码时,rsult是相同的=QWE
如果 comoboBox1 .text<> ' // for string
comoboBox1.text = ' ///结果:QWE
或
comoboBox1.text = 0 ' ///结果:QWE
end 如果
或
if comoboBox1.text<> 0 然后 ' // for string
comoboBox1.text = 0 ' ///结果:QWE
或
comoboBox1.text = ' ///结果:QWE
结束 如果
< / pre >
在视觉工作室中,在菜单中我有构建,我已经完成了,清洁和建造...但没什么。
如果你帮助我,我将不胜感激。
最好的问候,
Nillo123。
解决方案
检查 SelectedIndex [ ^ ]属性并将其设置为 -1
;)
您可以尝试:< br $>
comboBox1.Items.Clear();
< pre lang =vb> 如果 Len(cbx_USER_ass.Text)<> 0 然后
cbx_USER_ass.Text = 什么
cbx_USER_ass.Enabled = False
结束 如果跨度>
Hello everyone!
How can i "remove" the details of comboBox?
***I'm getting the details of my database into the comboBox
I tried this code :
comoboBox1.text = ""
comoboBox1.text = 0
My comboBox contains, for exemple this string = "QWE"
When i tried this code down here, the rsult is the same = "QWE"
if comoboBox1.text <> "" then '//for string
comoboBox1.text = "" '/// result: QWE
or
comoboBox1.text = 0 '/// result: QWE
end if
OR
if comoboBox1.text <> 0 then '//for string
comoboBox1.text = 0 '/// result: QWE
or
comoboBox1.text = "" '/// result: QWE
end if
</pre>
In visual studio, in the menu I have "Build" and I've done, clean and Build... but nothing.
If you help me,I will appreciate.
With best regards,
Nillo123.
解决方案
Check the SelectedIndex[^] property and set it to -1
;)
You can try :
comboBox1.Items.Clear();
If Len(cbx_USER_ass.Text) <> 0 Then cbx_USER_ass.Text = Nothing cbx_USER_ass.Enabled = False End If
这篇关于我怎样才能“删除”组合框的细节?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文