VB.Net MenuStrip - 所有子菜单一次可见

发布于 2024-12-21 02:55:22 字数 197 浏览 3 评论 0原文

奇怪的问题:

我有一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

凌乱心跳 2024-12-28 02:55:22

请记住,可能的事情往往并不是我们想要的。

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.

蝶舞 2024-12-28 02:55:22

也许这可以帮助:

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文