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
515
Right Click on ButtonTool
posted

How can you trap a right click on a ButtonTool?

I can get the right click event anywhere on the toolbar via the BeforeToolbarListDropdown event, but I can't seem to apply that to the ToolClick event

Thanks!

Parents
No Data
Reply
  • 515
    Verified Answer
    posted

    Got it...

    I was set on handling the tool right click event in the ToolClick of the ToolbarsManager.. Instead, I have to handle the event inside the BeforeToolbarListDropdown event and check the current UIElement...

     

    For anyone interested (BeforeToolbarListDropdown) :

    ' Disable the ToolbarList Dropdown
    e.Cancel = True

    ' Display the Context Menu for Buttons w/ Prefix "CON_"
    If TypeOf e.Tool Is Infragistics.Win.UltraWinToolbars.ButtonTool Then
         If e.Tool.Key.StartsWith("CON_") Then
              **Code**
         End If
    End If

Children
No Data