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
185
UltraToolbarsManager can't remove default context menu
posted

Hi,

I'm trying to get rid of the default context menu that appears when you right click anywhere inside UltraToolbarsManager components. I found an article about how to setup a custom menu, but I want to remove the menu completely. See below picture showing the intruder:

I even followed that article and tried to setup an empty menu but when I right click both menus, mine and the default in the picture, show up.

I use netadvantage winforms 2008 vol 3.

Thanks.

  • 44743
    Verified Answer
    posted

    You can handle the BeforeToolbarListDropdown event and set e.Cancel to True.

    • 1075
      posted in reply to Mike Dour

      Thanks, this works for me too. The only strange thing is, when I right the click the toolbar, the cursor changes itself into a hand. When I move the mouse, it immediately changes back to the arrow.

      I tried to set the cursor in the BeforeToolbarListDropdown method, but this doesn't work (probably because I need to move the mouse). Can you help me with this? I am using version 9.2.20092.2074.

      • 1075
        posted in reply to Mike Dour

        Thank you.

        • 44743
          posted in reply to Reinier

          Yes, I was able to reproduce it. It looks like it may be a bug in the UltraExplorerBar. I have forwarded this post to the Developer Support Manager and a DS engineer will be contacting you about this issue.

          • 1075
            posted in reply to Mike Dour

            Thanks for your reaction. I only tried this in our business application, so I wasn't sure if it happens in other situations. I investigated this further, and noticed it had something to with the UltraExplorerBar we're using. I also learned that this had nothing to do with the BeforeToolbarListDropdown event after all, so I hope I'm not hijacking this thread.

            Here are the steps to reproduce. Besides the toolbar, add an UltraExplorerBar to your form. In there add a group and item. Run the program. First click on the item in the UltraExplorerBar, then right-click on the toolbar. This will change the mouse cursor until you move it again. If you don't click on the UltraExplorerBarItem, everythings works fine.

            It's not very disturbing when the context menu is shown, but when it's not, it looks pretty significant. I hope you can reproduce it with this information.

            • 44743
              posted in reply to Reinier

              I was not able to reproduce this in a sample. Do you have any custom code that is changing the cursor? Make sure it is not getting hit in this situation.

            • 185
              posted in reply to Mike Dour

              Great, it works. Thanks.