以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]下拉窗口筛选条件 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=193956) |
-- 作者: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("|", "\',\'") & "\')") 通用查询窗口有个下拉窗口,引用的是"窗口下拉模板",想根据查询窗口的条件来筛选"窗口下拉模板"中显示的内容,有什么办法实现 |
-- 作者:有点蓝 -- 发布时间:2024/10/28 14:27:00 -- 代码放到哪里的? |
-- 作者:lgj716330 -- 发布时间:2024/10/28 14:55:00 -- "窗口下拉模板"的AfterLoad事件 |
-- 作者:有点蓝 -- 发布时间:2024/10/28 15:06:00 -- 放到DropDownOpening事件 |
-- 作者: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(",")
|
-- 作者:有点蓝 -- 发布时间: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
|