VB.Net MenuStrip - 所有子菜单一次可见
奇怪的问题:
我有一个 VB.Net Windows 窗体中的菜单条,我大学的老师说,如果我能让菜单条的所有下拉菜单立即可见,他就会让我从考试中解脱出来:D
这是否可能?如何?
我知道我可以 .ShowDropDown()
一个条目,但是当我调用下一个条目时,第一个条目会隐藏。
提前致谢!
Weird question:
I have a menustrip in a VB.Net windows form, my teacher in the university said that if I could make all dropdowns of the menustrip become visible at once, he would release me from the exam :D
Is this even possible and how?
I know I can .ShowDropDown()
an entry, but when I call the next, the first one hides.
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请记住,可能的事情往往并不是我们想要的。
Windows 用户期望程序以某些标准方式运行,并按照 Microsoft 提倡的各种风格和设计指南进行布局。
当您的程序违反这些准则时,用户会感到困惑和恼怒。
界面设计很重要,你的老师希望让你思考这个领域。专业的答案是,尽管可以一次打开所有下拉菜单,但这对用户来说将是一种不愉快的体验。
Bear in mind that often what is possible is not what is desirable.
Users of Windows expect programs to behave in certain standard ways and to be laid out following the various style and design guidelines promoted by Microsoft.
When your program breaks those guidelines users become confused and annoyed.
Interface design is important and your teacher is hopefully trying to get you to think about this area. The professional answer would be that although it is possible to have all the drop downs open at once it would be an unpleasant experience for the user.
也许这可以帮助:
CType(MenuStrip1.Items(0), ToolStripDropDownItem).DropDown.AutoClose = False
CType(MenuStrip1.Items(1), ToolStripDropDownItem).DropDown.AutoClose = False
CType(MenuStrip1.Items(0), ToolStripDropDownItem) .ShowDropDown()
CType(MenuStrip1.Items(1), ToolStripDropDownItem).ShowDropDown()
在我的测试中,我同时打开了 ToolStripDropDownItems 内的两个 DropDown。
Maybe this can help:
CType(MenuStrip1.Items(0), ToolStripDropDownItem).DropDown.AutoClose = False
CType(MenuStrip1.Items(1), ToolStripDropDownItem).DropDown.AutoClose = False
CType(MenuStrip1.Items(0), ToolStripDropDownItem).ShowDropDown()
CType(MenuStrip1.Items(1), ToolStripDropDownItem).ShowDropDown()
In my test I get the two DropDown inside the ToolStripDropDownItems opened at the same time.