以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 导航栏运行错误 ,代码如何改? (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=51009) |
-- 作者:zerov -- 发布时间:2014/5/16 22:46:00 -- 导航栏运行错误 ,代码如何改? 弄了一个动态根据 表生成功能组与导航栏的,但导航栏出问题,在功能组中,能正常隐藏未勾选的功能区,但在导航栏中,却不正确 的全部显示了,哪位大师帮我看看,代码哪儿出错了? Dim dt As DataTable = DataTables("zac00000") For Each tbs As String() In dt.GetUniqueValues("","funcid","funcname") Dim t As New RibbonMenu.Tab(tbs(0)) t.Text = tbs(1) \'设置功能区的标题 RibbonTabs.Add(t) For Each gps As String() In dt.GetUniqueValues("funcid = \'"& t.name &"\'","fungid","fungname") Dim g As new RibbonMenu.Group(gps(0)) g.Text = gps(1) \'设置功能组的标题 t.Groups.Add(g) For Each itms As String() In dt.GetUniqueValues("funcid = \'"& t.name &"\' and fungid = \'"& g.name &"\' and ismenu = true","funbid","funbname","funicon","code") Dim b As New RibbonMenu.Button(itms(0)) b.Text = itms(1) \'设置功能按钮的标题 b.LargeImage = GetImage(itms(2)) b.ToolTip = itms(3) \'设置功能组按钮的提示 g.Items.Add(b) Next g.Visible = (g.Items.Count > 0) Next t.Visible = (t.Groups(0).visible = True) |
-- 作者:Bin -- 发布时间:2014/5/17 8:30:00 -- 有重复说明重复添加了多次. 具体能上个例子供测试分析会比较好点.
|