以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]层级目录树定位 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=180216) |
-- 作者:miaoqingqing -- 发布时间:2022/10/8 9:19:00 -- [求助]层级目录树定位 Dim trv As WinForm.LayersTree = e.Form.Controls("LayersTree1") Dim st As New LayerTreeSetting st.PathCol = "zfjm" st.TextCol = "zfwl" st.ValueCol = "zssl" st.Separator = "." st.GridTree = True st.Unique = True st.ExpandTo = -1 \'全部展开 trv.BuildFilterTree(Tables("wz2xm_Table3"),st) \'副本表 \'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'上面代码生成层级目录树后,求助实现目录树定位在第一个第一级的层级目录树节点上(便于筛选表行显示少一点,避免表显示所有行) 下面这个代码报错,不行 Dim tr As WinForm.LayersTree tr = e.Form.Controls("LayersTree1") tr.SelectedNode = tr.Nodes(0).Nodes(1) [此贴子已经被作者于2022/10/8 9:22:21编辑过]
|
-- 作者:有点蓝 -- 发布时间:2022/10/8 9:32:00 -- Dim tr = e.Form.Controls("LayersTree1").basecontrol tr.SelectedNode = tr.Nodes(1).Nodes(1)
|