Posted 12 November 2018, 5:34 pm EST
Hi,
I’m new to C1 WinForms.
I have created a C1Ribbon dynamically, based on an example from the installation (AddRibbonItems), but how do I raise some events?
Regards
Jan
Forums Home / ComponentOne / WinForms Edition
Posted by: jn on 12 November 2018, 5:34 pm EST
Posted 12 November 2018, 5:34 pm EST
Hi,
I’m new to C1 WinForms.
I have created a C1Ribbon dynamically, based on an example from the installation (AddRibbonItems), but how do I raise some events?
Regards
Jan
Posted 13 November 2018, 2:58 am EST
Hello Jan,
Thank you for contacting us.
Since I am not sure which events you wish to raise, I am showcasing here how to handle the events for the RibbonItems like clicking ToggleButtons like Bold, Underline, etc . For this, you need to handle their Click event while dynamically adding to C1Ribbon. I have attached a demo sample adding ribbon items dynamically and also handled their click events.
In addition to this, you may also refer to the following documentation page for more information on this: http://help.grapecity.com/componentone/NetHelp/c1ribbon/webframe.html#handlingribbonevents.html
Regards,
Ruchir
AddRibbonItems.zip
Posted 13 November 2018, 3:51 am EST
Hello Ruchir,
Thank you for your answer.
A click event is fine. Could you please send me a VB.net implementation, because when I try to transfer your C# example to my code, I cannot see the events for the ribbonbuttons.
Regards,
Jan
Posted 14 November 2018, 1:32 am EST
Hi Jan,
You can find the VB.NET implementation for the previous sample in the attachments.
Regards,
Jitender
AddRibbonItemsVB.zip
Posted 14 November 2018, 4:19 am EST
Hi Jitender,
Thanks, that worked.
Regards,
Jan