Foxtable(狐表)用户栏目专家坐堂 → 下拉窗口再打开时,复选框还能再根据Dropbox内容恢复勾选吗?


  共有2297人关注过本帖树形打印复制链接

主题:下拉窗口再打开时,复选框还能再根据Dropbox内容恢复勾选吗?

帅哥哟,离线,有人找我吗?
bagih
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:幼狐 帖子:113 积分:1344 威望:0 精华:0 注册:2014/11/12 16:55:00
下拉窗口再打开时,复选框还能再根据Dropbox内容恢复勾选吗?  发帖心情 Post By:2015/8/28 20:37:00 [只看该作者]

下拉窗口再打开时,复选框还能再根据Dropbox内容恢复勾选吗?

 

下拉菜单展开前代码

Dim lb As WinForm.CheckedListBox = e.Form.Controls("CheckedListBox1")
lb.ComboList = DataTables("表A").GetComboListString("业务员")
e.Form.baseform.Width = e.Form.DropDownBox.Width

 

 

关闭后代码

Dim s As String
Dim l As WinForm.CheckedListBox = e.Form.Controls("CheckedListBox1")
For Each Index As Integer In l.CheckedIndices
    If s > "" Then
        s = s & ","
    End If
    s = s & "'" & l.Items(Index) & "'"
Next

If s > "" Then
       Forms("父窗口").Controls("DropBox1").text = s
End If


 回到顶部
帅哥哟,离线,有人找我吗?
大红袍
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2015/8/30 11:31:00 [只看该作者]

展开的时候,

 

Dim ary() As String = e.Form.DropDownBox.Value.Split(",")
Dim l As WinForm.CheckedListBox = e.Form.Controls("CheckedListBox1")
For i As Integer = 0 To l.Items.Count - 1
    If array.indexof(ary, "'" & l.Items(i) & "'") >= 0 Then
        l.SetItemChecked(i, True)
    End If
Next


 回到顶部