取消选择列表框中的所有项目 [英] Unselect all items in a listbox
本文介绍了取消选择列表框中的所有项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个列表框,最初显示的是选择的第一项.我希望它显示时未选择任何项目.这可能吗?
I have a ListBox that initially displays with the first item selected. I want it to display with no items selected. Is this possible?
谢谢
推荐答案
ListBox.ClearSelected()
或
ListBox.SelectedIndex = -1
当然,它们是成员方法.
Of course, they are member methods.
这篇关于取消选择列表框中的所有项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文