以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助]如何让组合复选框的项目顺序与列位置顺序一致  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=152218)

--  作者:绿火柴
--  发布时间:2020/7/9 18:23:00
--  [求助]如何让组合复选框的项目顺序与列位置顺序一致
Dim tab as table = tables("XXX")
Dim cb As WinForm.CheckedComboBox = e.Form.Controls("CheckedComboBox1")
Dim str As String
For ia As Integer = 0 To tab.Cols.Count - 1
Dim dc As Col = tab.Cols(ia)
    If str = "" Then
        str = dc.Name
    Else
        str = dc.Name & "|"  & str
    End If
Next
cb.ComboList = str

--  作者:有点蓝
--  发布时间:2020/7/9 20:03:00
--  
Dim tab as table = tables("XXX")
Dim cb As WinForm.CheckedComboBox = e.Form.Controls("CheckedComboBox1")
Dim str As String
For ia As Integer = 0 To tab.Cols.Count - 1
Dim dc As Col = tab.Cols(ia)
    str =str & "|" & dc.Name
Next
cb.ComboList = str.trim("|")

--  作者:绿火柴
--  发布时间:2020/7/9 23:20:00
--  
明白了,是我顺序搞反了。