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 :
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?
Well I'll be... If you give .ShowPopup an Owner (second argument), it seems to work just fine...Simply specifying a location is not enough..Thank you clazarev!
Hi,
I'm using the folowing code on MouseUp event
ctlPanelContextMenu.ShowPopup(Cursor.Position, ctlUltraGrid);
and it works. Version is 8.2
clazarev, you are using Cursor.Position and it is showing at the cursor location?ex:
myContext.ShowPopup(Cursor.Position)
This is not working for meIn fact, it doesn't work even if I give it a specific screen location, for instance:myContext.ShowPopup(New Point(600, 600))
Could you please post a snippet of the code you are using and your build number?
I m getting the same issue but using <code>Cursor.Position</code>is working fine.
Hi Mike
Thanks for the reply. I did initially try all of the above mentioned coordinates, but they all get overridden after the pass and the popup gets placed on the menu top-left location.
Will submit the issue.