I have a context menu strip with 8 items and two separators. When the user brings up the context menu strip, then hits the arrow key to scroll through the items, hitting the eighth item causes the menu to 'scroll' up, leaving blank space at the bottom. Is there any way to prevent that behaviour?
A:
Jon
2009-05-13 16:45:56
What OS ver. do you use?I just tried your issue on vista and it doesn't occur.If you use vista, please post the code and will test it, maybe I can help.
Shimmy
2009-05-13 17:41:20
Yes, that's exactly what I'm seeing with my right-click context menus. It really does seem like a flaw in the menu itself, I couldn't find anything that would allow me to change that functionality in the documentation. Perhaps if I had time, I could dig in with a reflector and figure out how to override that behaviour...
genki
2009-05-13 20:40:35
Well this is the strange thing. This behavior only happens on that Reports drop-down in my app.. All the other dropdowns are fine.
Jon
2009-05-14 10:31:30
I think it might have a minimum number of items requirement. I'll check to see if any other of my menus have this behaviour.
genki
2009-05-14 18:42:00
+3
A:
I found it. It turns out that if you have items in the menu that are not visible, it screws with the spacing. The fix was to change the logic to actually remove/add items or rebuild the menu rather than toggling menu item visibility. This is one case where toggling .Visible had some odd behaviour.
genki
2009-05-21 22:10:36