scroll popup menu via Page Up/Down
-
In the case where a popup menu is too long to fit on the screen, I would like it to scroll in response to the Page Up, Page Down, Home, and End keys. Is there any way to accomplish this? It would also be nice if the menu scrolled in response to the mouse wheel. It seems that by default the only way to scroll a popup menu is via the arrow buttons at the top and bottom of the menu, or via the up and down keys. This is counter-intuitive, particularly on small screens. I understand that long popup menus are suboptimal, and that the stock behavior may be Microsoft's subtle way of discouraging me from using such menus, but I want it to work better regardless. I would be willing to use a hook function if necessary, however even if I manage to intercept the relevant keys it's not obvious how I can tell the menu to scroll, since it isn't a window. I have observed this behavior on Windows 7 using Common Controls 6, in both Aero and Classic themes. Is the behavior likely to differ in Windows 8, and/or in later versions of Common Controls?
-
In the case where a popup menu is too long to fit on the screen, I would like it to scroll in response to the Page Up, Page Down, Home, and End keys. Is there any way to accomplish this? It would also be nice if the menu scrolled in response to the mouse wheel. It seems that by default the only way to scroll a popup menu is via the arrow buttons at the top and bottom of the menu, or via the up and down keys. This is counter-intuitive, particularly on small screens. I understand that long popup menus are suboptimal, and that the stock behavior may be Microsoft's subtle way of discouraging me from using such menus, but I want it to work better regardless. I would be willing to use a hook function if necessary, however even if I manage to intercept the relevant keys it's not obvious how I can tell the menu to scroll, since it isn't a window. I have observed this behavior on Windows 7 using Common Controls 6, in both Aero and Classic themes. Is the behavior likely to differ in Windows 8, and/or in later versions of Common Controls?
ckorda wrote:
the behavior likely to differ in Windows 8, and/or in later versions of Common Controls?
Yes. The common controls are changed with almost every windows-version.
ckorda wrote:
This is counter-intuitive, particularly on small screens.
It's not. The navigation-part is not provided by the application, but by the OS whose controls you are using. Context-menu's in Windows can be navigated using the cursor-controls. That's also what the user expects. It's counter-intuitive to hunt for which key you think would be nice. There's also an accelarator-key, it's the one character that's underlines when you hit Alt-F10 which can be used for quick-navigation. It also allows for sub-menu's, allowing one to build a hierarchy. If it doesn't fit the screen, then you have too many items. Divide them in groups and use submenu's, or move them somewhere else. Are they REALLY ALL of them depending on the context? If not, then move them to a toolbar. If it really is a list, then don't use a menu - use a popup with a listbox. Don't abuse the system, and don't program against it - your hack may work fine in one version, and mess things up in another. Keep it simple and standard. Alternatively, if you really want this, then implement your own menu. It's just a Window with some buttons.
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]