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
3550
Add menu to treenode
posted

Can I add menu to treenode, that shows on mouse right click

  • 469350
    Offline posted

    Hi,

    Of course you can. You can add a ContextMenu to any control using the ContextMenu, ContextMenuStrip, or UltraToolbarsManager.

    All of these classes work on the entire control, though. So typically, you would trap the MouseMove event of the control and change the ContextMenu assigned to that control based on the current location of the mouse. To trap when the mouse is over a node in the tree, you can use the tree's GetNodeFromPoint method.