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
450
PopupMenu positioning issue
posted

Hi

My requirement is to replace the normal right-click menu of the ribbon for certain controls on the ribbon with a custom popup menu.

I create a PopupMenuTool, add it to the UltraToolBarManager, add tools to it.

Then in the _BeforeToolbarListDropdown of the toolbarmanager I cancel = true; to prevent the default menu from popping up

and then :

Point p = new Point(MousePosition.X, MousePosition.Y);

popupMenuTool1.ShowPopup(p);

 My custom menu pops up, but the problem is that when I right-click on any control, even a menu, the popup appears in the right place; but when I right-click on a menu item, the popup appears at the top-left of that menu, even though it's not near my mouse position.

 

Is there something I am missing, or a better way to create my popup menu with custom functions that would appear on right-click of a ribbon control?

 

Parents Reply Children
No Data