Custom QAT Right Click Menu / Or Custom Event

Posted by: ivan.stanojkovski on 26 July 2021, 12:16 am EST

    • Post Options:
    • Link

    Posted 26 July 2021, 12:16 am EST - Updated 3 October 2022, 1:29 pm EST

    Hello

    Can we somehow achieve to have our custom menu on right-click or somehow override the RibbonButton MouseDown event?

    We need this because we want to make our Custom function to add selected items to a new custom C1RibbonTab instead of QuickAccessToolbar or to have option to our custom MouseDown event on RibbonButton.

    Something like on this example:

    Best regards.

  • Posted 26 July 2021, 4:04 pm EST

    Hi,

    You can achieve this using the MouseUp event and the ShowContextMenu method of Ribbon. First, you need to add items to the context menu using the ContextMenuItems property of the Ribbon. Then you can use the MouseUp event and then the GetItemAt method of the Ribbon to get the item at the mouse location. If a RibbonButton or any other desired RibbonItem was clicked, you can use the ShowContextMenu method to show your custom context menu.

    Please refer to the sample attached and modify it according to your requirements.

    Regards

    Avnish

    RibbonContext.zip

  • Posted 4 May 2022, 1:43 am EST - Updated 3 October 2022, 1:29 pm EST

    Thank you, Avnish.Kumar, it’s working for the first level

    BUT - Any RibbonItem below RibbonMenu does not recognize MouseUp event.

    In this structure (pic) the custom context menu is working fine until RibbonButton3 and RibbonButton4.

    I wonder if there is any solution available for this?



    my code:

    RibbonContext.zip

  • Posted 4 May 2022, 3:06 pm EST

    Hi,

    We have escalated the issue to the development team to get their insights on this. We will let you know as soon as we have an update.

    Regards

    Avnish

    [Internal ID : C1WIN-27319]

  • Posted 4 May 2022, 10:18 pm EST

    Hi,

    As per the development team, there is no workaround for this case currently since the menu dropdown is shown in a separate dropdown form.

    We have posted a feature request to the development team. We will let you know when we have an update.

    Regards

    Avnish

    [C1WIN-27319]

  • Posted 12 May 2022, 8:03 pm EST

    Thanks, Avnish, for the reply.

    Is there any other way to change / modify the existing context menu for RibbonItem-s?

  • Posted 12 May 2022, 10:17 pm EST

    Hi,

    Sorry for the inconvenience but there is no other way currently to customize the context menu of the RibbonItems. The case has been reported to the development team and they are working on introducing new behavior to customize the context menu for ribbon items. We will let you know as soon as we have an update.

    Regards

    Avnish

  • Posted 19 December 2022, 3:51 pm EST

    Hi,

    The latest 22v3 release includes the improved ContextMenuPopup event for Ribbon. For more info on how you can customize the context menu, you can refer to https://www.grapecity.com/componentone/docs/win/online-ribbon/contextmenu.html.

    Regards

    Avnish

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels