菜单项可见性 [英] menu item visibility
问题描述
大家好!
我创建了form1,在其中我创建了菜单栏名称"Function"并具有子菜单
"F1","F2","F3","F4",默认情况下,其可见性为false,修饰符为public
我用相同的名称创建了一个函数pce private void display()
然后在那边制作
F1.visibile = true
F2.visibile = true
F3.visibile = true
F4.visibile = true
但这些子菜单仍然不可见
为什么
我不明白我在做什么小错误
您能帮我吗?
Hi to all!
i have create form1 in which i created menustrip names "Function" and have submenus
"F1", "F2", "F3", "F4", default i their visibility is false and modifiers is public
and i create one function in the same namespce private void display()
and over there i make the
F1.visibile=true
F2.visibile=true
F3.visibile=true
F4.visibile=true
but still these submenus are not visible
why
i didnt understand that what little mistake i am doing
can u help me please
推荐答案
1. F1是否真的与菜单中使用的F1对象相同?
如果是另一个
创建的相同对象Menu = new CustomizedSubMenu( ... );
菜单已经存在时,则其可见性更改将不会对原始F1对象产生影响.
2.确保F1的父母也是visilbe = true
1. Is F1 really the same F1 object that is used in the menu?
If it''s another, identical object created with
Menu = new CustomizedSubMenu( ... );
at a time when the menu already exists, then its visibility change will have no effect on the original F1 object.
2. Make sure that F1''s parent is alsovisilbe = true
这篇关于菜单项可见性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!