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
200
Applying a ContextMenuStrip to an UltraExplorerBarItem
posted

Hi All,

I am trying to add a ContextMenuStrip to an UltraExplorerBarItem object but I cannot see how, or even if it is possible to do this.  Can anyone shed some light on this for me?

Thanks in advance,

Denis

Parents
No Data
Reply
  • 225
    posted

    I am not sure if there is a suggested way to do this, but I am in it for results. Here is something you can try.

    Capture the mouse down event on the ultraexplorerbar. In the mouse down event, check if the button is the right mouse button. If it is there is a little known function you can call, ItemFromPoint().

    Create an item and pass it the mouse position:

    UltraExplorerBarItem item = new UltraExplorerBarItem();
    item = ultraExplorerBar1.ItemFromPoint(e.Location);

    The function returns the item from the point, or null if there is none. Now you can pop a custom context menu.

Children
No Data