以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]列表项目(已解决) (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=166149) |
-- 作者:天一生水 -- 发布时间:2021/5/20 21:36:00 -- [求助]列表项目(已解决) 蓝老师好! 我想把重新获取的集合 Pros 作为CheckedComboBox的列表项,怎样赋值? 谢谢! Dim Products As List(Of String) Dim Pros As New List(Of String) Products = DataTables("数据表").SQLGetValues("被告类别") For Each Product As String In Products For Each s As String In Product.split("|") If s > "" Then If Pros.Contains(s)= False Then Pros.Add(s) End If End If Next Next \'For Each Pro As String In Pros \'Output.Show(Pro) \'Next Dim cmb As WinForm.CheckedComboBox cmb = e.Form.Controls("CheckedComboBox1") cmb.ComboList = ? [此贴子已经被作者于2021/5/20 22:01:14编辑过]
|
-- 作者:ZXY -- 发布时间:2021/5/20 21:48:00 -- 直接用: cmb.ComboList = DataTables("数据表").SQLGetValues("被告类别") 就可以呀
|
-- 作者:天一生水 -- 发布时间:2021/5/20 21:51:00 -- 解决了。是这种情况: Dim Products As List(Of String) Dim Pros As New List(Of String) Products = DataTables("数据表").SQLGetValues("被告类别") For Each Product As String In Products For Each s As String In Product.split("|") If s > "" Then If Pros.Contains(s)= False Then Pros.Add(s) End If End If Next Next Dim str As String= "" For Each Pro As String In Pros \'Output.Show(Pro) str & = pro & "|" Next str = str.Trim("|") Dim cmb As WinForm.CheckedComboBox cmb = e.Form.Controls("CheckedComboBox1") cmb.ComboList = str [此贴子已经被作者于2021/5/20 22:00:33编辑过]
|