以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  快捷菜单、自定义项目  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=122242)

--  作者:wuchangke4
--  发布时间:2018/7/21 13:06:00
--  快捷菜单、自定义项目
在快捷菜单的Click事件定义如下代码,欲实现列“施工部位”的选择性输入,选择内容从列名提取,求修改
Dim i,j As Integer
For Each skdt As DataTable In DataTables
  If right(skdt.name,2) = "gc" Then
    i= i+1
  End If
Next
Dim skcaption(i-1) As String
For Each skdt As DataTable In DataTables
  If right(skdt.name,2) = "gc" Then
    j=j + 1
    skcaption(j-1) = skdt.caption
  End If
  output.show("skcaption(" & j & ")=" & skcaption(j-1))
Next
Dim cmb As WinForm.ComboBox
cmb = Forms("窗口1").Controls("ComboBox1")
cmb.ComboList = String.join("|",skcaption)

--  作者:有点蓝
--  发布时间:2018/7/21 14:21:00
--  
Dim lst As new List(of String)
For Each skdt As DataTable In DataTables
    If right(skdt.name,2) = "gc" Then
        lst.Add(skdt.Caption)
    End If
Next
Dim cmb As WinForm.ComboBox
cmb = Forms("窗口1").Controls("ComboBox1")
cmb.ComboList = String.join("|",lst.ToArray)

--  作者:wuchangke4
--  发布时间:2018/7/21 14:42:00
--  
Dim cmb As WinForm.ComboBox
cmb = Forms("窗口1").Controls("ComboBox1")
cmb.ComboList = String.join("|",lst.ToArray)
这段代码错?

--  作者:有点蓝
--  发布时间:2018/7/21 14:47:00
--  
不可能的,出什么错?