获取所有组合框项目 [英] get all combobox items
本文介绍了获取所有组合框项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何获取所有组合框项目?
例如我的组合框有这些项目,H需要将所有这些项目添加到我的richtextbox:
test1
test2
test3
....
给我一些例子。
谢谢
How to get all combobox items?
For example my combobox has these items and H need to add all of these items to my richtextbox:
test1
test2
test3
....
Give me some examples.
Thanks
推荐答案
简单循环是
For Each i as Object in combobox1.Items
'do something with i.ToString()
Next
您可以将文本附加到richtext框或直接将其放到文件中。如果您使用谷歌,则有许多文件处理示例,例如: http://www.techrepublic.com/article/read -and-write-text-files-with-visual-basic-net / [ ^ ]
还有很多关于使用组合框的教程例如 http://www.tutorialspoint.com/vb.net/vb.net_combobox.htm [ ^ ]
>
这篇关于获取所有组合框项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文