Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共6 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:[求助]下拉窗口筛选条件

1楼
lgj716330 发表于:2024/10/28 14:25:00
Dim cmb1 As WinForm.CheckedComboBox
Dim cmb2 As WinForm.CheckedComboBox
cmb1 = Forms("通用查询").Controls("HSDW")
cmb2 = Forms("通用查询").Controls("BMLX2")
Dim str2 As String = Forms("通用查询").Controls("BMLX1").text 
Dim trv As WinForm.TreeView = Forms("窗口下拉模板").Controls("TreeView1")

trv.BuildTree("部门档案", "组织|部门名称", "组织 In ( '" & cmb1.ComboList.replace("|", "','") & "') and " & str2 & " In ( '" & cmb2.ComboList.replace("|", "','") & "')")

通用查询窗口有个下拉窗口,引用的是"窗口下拉模板",想根据查询窗口的条件来筛选"窗口下拉模板"中显示的内容,有什么办法实现

2楼
有点蓝 发表于:2024/10/28 14:27:00
代码放到哪里的?
3楼
lgj716330 发表于:2024/10/28 14:55:00
"窗口下拉模板"的AfterLoad事件
4楼
有点蓝 发表于:2024/10/28 15:06:00
放到DropDownOpening事件
5楼
lgj716330 发表于:2024/10/28 17:19:00
做了个下拉框的全选,下面把所有节点内容都选过来了,怎样只选末级
Dim s As String = ""
Dim trv As WinForm.TreeView = Forms("窗口下拉模板").Controls("TreeView1")
For Each nd As WinForm.TreeNode In trv.ALLNodes
    If nd.Level = 1 Then 
        nd.Checked = True
    End If
    s = s & "," & nd.Text
Next
Forms("窗口下拉模板").DropDownBox.Value = s.trim(",")

图片点击可在新窗口打开查看此主题相关图片如下:微信图片_20241028170552.png
图片点击可在新窗口打开查看

6楼
有点蓝 发表于:2024/10/28 17:27:00
For Each nd As WinForm.TreeNode In trv.ALLNodes
    If nd.Level = 1 Then 
        nd.Checked = True
    s = s & "," & nd.Text
    End If
Next
共6 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .02344 s, 2 queries.