Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
325
Limit the number of visible menu entries - PopupMenuTool
posted

I have a popup context menu that is dynamically populated with entries.
It is possible that the number of entries is quite large, so the context menu would take up a lot of space on the screen.

If the number of entries in the context menu is larger than my screen's height I get 2 nice arrows at the top & bottom of my context menu allowing me to "scroll" through the list of available entries.

This feature is quite nice and I would like to take advantage of it: I would like to limit the list of visible context menu entries to ~ 10 and then use the "arrows" to scroll through all the menu entries.

Unfortunately I couldn't find any way of limiting the height/number of visible times for a context menu.

Any ideas?

Atm I am using the Infragistics library (PopupMenuTool) to help create the context menus.

Addendum: It seems that ContextMenuStrip is something like what I want but I want the ContextMenuStrip (or something similar) to be a submenu in my popup menu.

Parents
No Data
Reply
  • 44743
    posted

    The PopupMenuTool doesn't have a way to restrict it's height. The size of the drop down is always based on where the user clicked, how many items are in the menu, and how big the screen is.

    What advantage does the ContextMenuStrip provide over the PopupMenuTool? If it is the ability to nest menus you are looking for, the PopupMenuTool has this ability as well. Just add another PopupMenuTool to the one you are using as the context menu.

Children