隐藏ToolstripMenuItem组件的Dropdown菜单项 [英] To hide the Dropdown menu items of ToolstripMenuItem component
本文介绍了隐藏ToolstripMenuItem组件的Dropdown菜单项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在MDI表单中隐藏ToolstripMenuItem组件的下拉菜单项?
示例:
1> Master
1a> Account-> subledger,...等。
1b> Item-> category,group,manufacturer,....等等。 >
我想隐藏'项目(1b)'的下拉菜单项
任何人请帮助我..
How will i hide the Dropdown menu items of ToolstripMenuItem component in MDI Form??
Example:
1>Master
1a>Account->subledger,...,etc.
1b>Item->category,group,manufacturer,....,etc.
I want to hide the Dropdown menu items of 'Items(1b)'
anybody Please help me..
推荐答案
试试。
ToolStripItem.Visible属性 [ ^ ]
你浏览DropDownItems并使其显示为false;
假设tstr是你的菜单项,
tstr.DropDownItems [i] .Visible = false;其中i是您的项目的索引。
you go through your DropDownItems and make the visible false;
assume tstr is your menu item,
tstr.DropDownItems[i].Visible = false; where i is the index of your item.
这篇关于隐藏ToolstripMenuItem组件的Dropdown菜单项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文