C # - Context Menu Strip has scroll behavior when user press arrow keys

I have a context menu bar with 8 elements and two delimiters. When the user displays a strip of the context menu, then presses the arrow key to scroll through the elements, clicking on the eighth element causes the menu to โ€œscrollโ€ up, leaving an empty space at the bottom. Is there a way to prevent this behavior?

+4
source share
2 answers

I found him. It turns out that if you have items in the menu that are not visible, they are locked at intervals. The fix was to change the logic to actually remove / add items or rearrange the menu, rather than switch the visibility of menu items. This is one case where there was some strange behavior to switch โ€œvisibleโ€.

+5
source

I posted this as an answer because I wanted to add images to the wiring. I see the same behavior, and I think this is a flaw in the popup menu.

Here's what happens:

BEFORE http://jongallant.googlepages.com/before.png AFTER http://jongallant.googlepages.com/after.png

This only happens when the user enters the context menu using the keyboard. This is like trying to do some kind of scrolling, because if you continue to do the list, the selection is reset at the top.

0
source

All Articles