以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 如何将窗口菜单遍历创建成目录树 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=176077) |
-- 作者:lisangyu -- 发布时间:2022/3/29 17:09:00 -- 如何将窗口菜单遍历创建成目录树 蓝总:Dim tv As WinForm.TreeView = e.Form.Controls("TreeView1") tv.Nodes.Clear tv.Nodes.Add("主菜单") For Each rtb As Winform.Strip In Forms("主窗口").Strips If tv.Nodes("主菜单").Nodes.Contains(rtb.Name) = False tv.Nodes("主菜单").Nodes.Add(rtb.Name) End If For Each grp As WinForm.StripItem In Forms("主窗口").Strips("主菜单").Items If tv.Nodes("主菜单").Nodes(rtb.Name).Nodes.Contains(grp.Name) = False Then tv.Nodes("主菜单").Nodes(rtb.Name).Nodes.Add(grp.Name) End If For Each itm As WinForm.StripItem In Forms("主窗口").Strips("主菜单").Items.Items If tv.Nodes("主菜单").Nodes(rtb.Name).Nodes(grp.Name).Nodes.Contains(itm.Name) = False Then tv.Nodes("主菜单").Nodes(rtb.Name).Nodes(grp.Name).Nodes.Add(itm.Name) End If Next Next Next 没有功能区好搞,请老总指点
|
-- 作者:有点蓝 -- 发布时间:2022/3/29 17:17:00 -- 使用递归,类似这种:http://www.foxtable.com/webhelp/topics/2416.htm |