以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助] 怎么遍历快捷菜单及其项目呢? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=141070) |
-- 作者:龙潭春早 -- 发布时间:2019/9/20 17:29:00 -- [求助] 怎么遍历快捷菜单及其项目呢? 想遍历快捷菜单及其项目,下面这段代码中,红色字体应该是什么呢? For Each cm As RibbonMenu.ContextMenu In ContextMenus For Each itm As XXX.item In cm.items output.show(itm) Next Next |
-- 作者:有点蓝 -- 发布时间:2019/9/20 20:23:00 -- For Each cm As RibbonMenu.ContextMenu In ContextMenus output.show("menu:" & cm.Name) For Each itm As object In cm.items output.show("++menu1:" & itm.Name) If Typeof cm.Items(itm.Name) Is RibbonMenu.ContextCommandMenu Then For Each itm2 As object In cm.Items(itm.Name).items output.show("++++Menu2:" & itm2.Name) Next End If Next Next |
-- 作者:龙潭春早 -- 发布时间:2019/9/21 15:41:00 -- 嗯 用Object判断! 多谢!
|