如何突破上下文菜单成的WinForms多个列? [英] How to break a context menu into more than one column in Winforms?

查看:142
本文介绍了如何突破上下文菜单成的WinForms多个列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 ContextMenuStip 包含的 ToolStripMenuItem 对象动态生成的列表。的问题是,当有太多了,以适应到屏幕上,微小的滚动按钮出现在顶部,并在该列表的底部,并通过列表滚动有点乏味。

I have a ContextMenuStip that contains a dynamically generated list of ToolStripMenuItem objects. The problem is that when there are too many of them to fit onto the screen, tiny scroll buttons appear at the top and at the bottom of the list, and scrolling through the list is a bit tedious.

我怎样才能让菜单自动打入2列或多列,因此用户不必滚动?

How can I make the menu to automatically break into 2 or more columns so the user does not have to scroll?

推荐答案

此行​​为从Windows下降一些,而前 - 注意了Windows Vista / 7的使用树显示在开始菜单中的程序。我怀疑,这是因为它presents太多的数据和决策的用户。

This behaviour was dropped from Windows some while ago -note that Windows Vista/7 use a tree to show programs in the start menu. I suspect that this was because it presents too much data and decision making for the user.

你确定这是present的最佳方式的选择给用户?

如果是这样,那么你可能需要一个自定义菜单控制,这将是一个相当大量的工作。

If so, then you will probably need a custom menu control which will be quite a lot of work.

  • 如果没有,那么你应该考虑如何 可以实现与同样的选择 其他控件。如何与列表 过滤器?
  • 有一些自然的分组到 项目?如果是这样,你可以分割成 列表框,组合框或树木。
  • 应用程序是否需要拆分 成不同的模式?
  • 是项目的数字? - 如果是这样一个 数字上/下控制可能的工作
  • If not, then you should consider how you can achieve the same choices with other controls. How about a list with a filter?
  • Is there some natural grouping to the items? If so you could split into listboxes, comboboxes or trees.
  • Does the application need splitting into different modes?
  • Are the items numbers? - if so a numeric up/down control might work

一般的方法是,以简化的决定的量使得该用户必须在任何时刻

The general approach is to simplify the amount of decision making that the user has to make at any moment.

花一些时间与在的WinForms工具箱中的所有控件玩,看看有什么效果很好。

Spend some time playing with all the controls in the WinForms toolbox to see what works well.

这篇关于如何突破上下文菜单成的WinForms多个列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆