自定义Windows UI菜单行为 - 使用鼠标滚轮右键单击菜单滚动 [英] Custom Windows UI Menu Behavior - Right-Click Menu Scrolling with Mouse Wheel

查看:263
本文介绍了自定义Windows UI菜单行为 - 使用鼠标滚轮右键单击菜单滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

TL :DR - 当我滚动鼠标滚轮时,我希望右键单击菜单上下移动。





我没有太多真正的技术背景所以请原谅我的天真。





程序添加时我非常喜欢右键单击有用的选项或子菜单区域菜单。我希望更多的时候你可以在安装过程中选择是或否,它们的用处让我很自在地说我可能总是在被问到时添加选项。


< p style ="margin:0in; margin-bottom:.0001pt">


结果虽然,菜单变得更长,这使得这些编程菜单带有击键快捷键特别重要,
,最好是一个不是已经采用默认系统菜单。*





现在,当您右键单击时,菜单会生成,光标位于左上角。如果你点击足够低,如果没有任务栏,菜单将变为刷新
与任务栏或屏幕底部。关于谁控制这些菜单,我有点不清楚。当在Windows资源管理器中并右键单击文件夹等时,菜单将继续生成齐射到底部,光标位于右边的
或菜单的左侧但是直到它稍微下降,在此处指向菜单翻转并生成与屏幕顶部齐平并且光标在右侧或左侧。如果菜单足够短,则不必刷新,它将生成
,光标位于底部,左侧或底部,右侧。





我不确定如何获得足够长的菜单来测试肯定,但我相信其他第三方程序时右键单击行为
doesn不一定遵循这种模式(一旦菜单刷新到底部,Mozilla浏览器似乎就会翻转,而不是在光标移动到某个点之后。





允许第三方软件在某种程度上进行调整。如果你保留了和我在一起,希望你有足够的兴趣知道我想要注入该行为银行的内容:





最终(或者你可能知道如何使分辨率足够低以至于整个菜单都不适合屏幕。此时它将是b $ b对于用户体验至关重要,而现在它会对于像我这样的用户来说非常有益,如果你可以在右键单击上进行菜单切换/向上和向下滚动。








首先关闭 - 这可能吗?




如果是这样,我可以请求某人指出我需要的资源来实现它(教育垫,存储行为设置
,像我这样的人可以问友好的论坛友好的程序员来设计,甚至已经完成了这个请求的程序。)希望不是最后一个因为我希望这实际上是一个相当独特和新颖的建议/请求
我真的很有兴趣学习怎么做。














*如果你想为整个社会做出贡献并成为那种特殊的好东西,请避免主要/流行的现有
加载项已经使用的字母.Lastpass使用{L}并且在非常低,所以如果一个系统选项已经使用它我必须按两次。我的肠道也说一个中央键,以容纳L和R递交用户并仍然允许可达性。

解决方案

您好The_Adam_M,



提前,很抱歉,如果我误解了您的需求。



我害怕:

ContextMenuStrip没有Scrollbar,即我们无法使其滚动。



我已经使用ContextMenuStrip制作了一个示例Windows窗体,左边是
,其中的一个项目可以通过MouseWheel选择,但是当所选项目位于其底部以下时我无法滚动它(蓝色 - 突出显示变得不可见。)
  



我建议你使用ListBox,ComboBox等(有Scrollbar)。而不是ContextMenuStrip。

(首先它是隐藏的。当用户右键单击一个表格时,它变得可见。)



问候,

Ashidacchi


TL:DR – I want the right-click menu to go up and down when I scroll the mouse wheel.


I don't have much truly technical background so please forgive my naïveté.


I really enjoy when programs add a helpful option or sub-menu area to the right-click menu. I wish more often it was something you could opt yes or no during install, their usefulness makes me comfortable saying I'd likely always add the option when asked.


As a result though, that menu gets longer, making it especially important that these programmed menus come with a keystroke shortcut, and preferably one that isn't already taken by default system menus.*


Now when you right click, the menu generates with your cursor in the top,left corner. If you click low enough, the menu will become flush with the task bar or bottom of the screen if no task bar. I'm a little unclear about who controls these menus. When in windows explorer and right clicking on folders and such, the menu will continue to generate flush to the bottom with the cursor on the right or left side of the menu BUT only until it gets a little bit down, at which point the menu flips and generates flush with the top of the screen and the cursor on the right or left side. If the menu is short enough it doesn't have to be flush, it will generate with the cursor in the bottom,left or bottom,right.


I wasn't sure how to get a long enough menu to test for sure, but I believe in other 3rd party programs when you right-click the behavior doesn't necessarily follow this schema (Mozilla browsers seem to flip as soon as the menu is flush to the bottom rather than after the cursor has moved past a certain point.


Working over these various behaviors makes me feel like somewhere in the system there is a section that dictates this behavior, and Windows allows 3rd party software to make tweaks to a certain degree. If you've kept with me this far, hopefully you're interested enough to know what I'd like to inject into that behavior bank:


Eventually (or maybe you know how to get the resolution low enough that the entire menu won't fit on the screen. At that point it will be essential to the user experience, whereas now it would just be extremely beneficial for users like myself if you could have the menu shift/scroll up and down with respect to the right-click.



First off - Is this possible?


If so, can I request someone point me towards the resources I'd need to make it happen (educational mats, where the behavior settings are stored, a forum where people like me can ask friendly a friendly programmer to design, or even a program that has already accomplished this request). Hopefully not the last one because I hope that this is actually a fairly unique and novel suggestion/request and I'd be really interested in learning how to do it.





*If you want to contribute to society as a whole and be that special kind of awesome, avoid letters already used by major/popular existing add-ins. Lastpass uses {L} and is at the very bottom, so if a system option used it already I would have to press twice. My gut says also a central key to accommodate L and R handed users and still allow reachability.

解决方案

Hi The_Adam_M,

In advance, sorry if I misunderstand your needs.

I'm afraid:
ContextMenuStrip does not have Scrollbar, i.e. we can not make it scrollable.

I've made a sample Windows Form with ContextMenuStrip,
and an Item in it can be selected by MouseWheel, but I could not scroll it when the selected Item is below the very bottom of it (blue-highlight becomes invisible).
   

I suggest you to use ListBox, ComboBox, etc (which has Scrollbar). instead of ContextMenuStrip.
(At first it is hidden. When a user right click on a Form, it becomes to be visible.)

Regards,
Ashidacchi


这篇关于自定义Windows UI菜单行为 - 使用鼠标滚轮右键单击菜单滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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