我有一些tooltrip菜单项,下面有一些其他的tooltrip菜单项。我如何处理第一个工具栏菜单(父),以便在某些条件满足时不打开并显示孩子。toolstripmenu拉手下拉
所以我有:
Documents: (parent toolstrip item)
----Document1 (child)
----Document2 (child)
----DOcument3 (child)
和documentsToolStripMenuItem_Click(object sender, EventArgs e)
我有
if(CurrentUser.HasPermission(0001))
{
MessageBox.Show("You do not have permission to access this module!");
//Here i need to prevent showing children of this parent
}
所以总结起来,用户需要允许按父工具条菜单项(文档),当他按下它,没有权利,我不想让他看到那个父母下面是什么(这是孩子)。
我知道我可以使该工具栏菜单隐藏或enabled = false
但我有其他的东西,因为它需要点击。
建立依赖于用户的权限菜单,则不需要进一步的检查。 – dcg
我写道,我需要看到有按钮,我需要被允许点击,即使我没有权限 – DoLoop