以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]复选列表框  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=188986)

--  作者:风声
--  发布时间:2023/11/3 14:21:00
--  [求助]复选列表框
老师好,下面代码不起作用。

图片点击可在新窗口打开查看此主题相关图片如下:2023-11-03 14 16 10.png
图片点击可在新窗口打开查看

Dim clist As WinForm.CheckedListBox = e.Form.Controls("CheckedListBox1")
For i As Integer = clist.Items.Count - 1 To 0 Step -1
    Tables(e.Form.Controls("ComboBox7").Text).Cols(i).Visible = not clist.GetItemChecked(i)
Next

--  作者:有点蓝
--  发布时间:2023/11/3 14:28:00
--  
调试

Dim clist As WinForm.CheckedListBox = e.Form.Controls("CheckedListBox1")
msgbox(e.Form.Controls("ComboBox7)
For i As Integer = clist.Items.Count - 1 To 0 Step -1
msgbox("i=" & i & ",Checked=" & (not clist.GetItemChecked(i)))
    Tables(e.Form.Controls("ComboBox7").Text).Cols(i).Visible = not clist.GetItemChecked(i)
Next