以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]想得到CheckedListBox没有选中的值,怎么做?  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=90275)

--  作者:alangoon
--  发布时间:2016/9/8 18:39:00
--  [求助]想得到CheckedListBox没有选中的值,怎么做?
 大红袍专家,

请问一下如何得到CheckedListBox控件没有选中的项目?我想得到没有选中的Value,不知道是否可行?谢谢!

--  作者:有点蓝
--  发布时间:2016/9/8 20:08:00
--  
Dim lst As WinForm.CheckedListBox
Dim v As new List(of String)
lst = Forms("窗口1").Controls("CheckedListBox1")

For i As Integer = 0 To lst.Items.Count -1
    If lst.GetItemChecked(i) = False Then v.Add(lst.Items(i))
Next