Posted 28 November 2023, 4:38 am EST
Hi,
I have use C1Ribbon 4.5.2, but I face the problem that when I set short-cut.
I have set short-cut Ctrl+S, but nothing happen when I use short-cut.
Pls check the attached file.
Thanks,
Duyet Le
Forums Home / ComponentOne / WinForms Edition
Posted by: levanduyet on 28 November 2023, 4:38 am EST
Posted 28 November 2023, 4:38 am EST
Hi,
I have use C1Ribbon 4.5.2, but I face the problem that when I set short-cut.
I have set short-cut Ctrl+S, but nothing happen when I use short-cut.
Pls check the attached file.
Thanks,
Duyet Le
Posted 28 November 2023, 10:22 am EST
Posted 28 November 2023, 11:28 am EST
Hi,
the solution is rather simple: if your form inherits from “C1RibbonForm” instead of just “Form”, it works.
Don’t know whether it could be considered a bug that shortcuts don’t work if the ribbon is used without “C1RibbonForm”. Is this your requirement in your “real world” use case?
Best regards
Wolfgang
Posted 29 November 2023, 2:50 am EST
Hello Duyet Le, Wolfgang,
Duyet, as Wolfgang said, you’ll have to inherit your Form from C1RibbonForm instead of System.Windows.Forms. C1RibbonForm comes with built-in functionality to handle shortcuts for the C1Ribbon buttons if they are set.
Shortcut handling is intended to occur at the Form level. If you’ve inherited your Form from C1RibbonForm, shortcuts will be handled automatically. However, if you inherit your Form from System.Windows.Forms, you will have to handle your shortcuts manually.
Wolfgang, We appreciate your prompt response. The observed behavior is by design. Please refer to the initial step in the documentation at https://developer.mescius.com/componentone/docs/win/online-ribbon/keyboardshortcuts.html. You’ll find that switching the Windows Form to a Ribbon Form is a prerequisite for proper functionality.
Regards,
Uttkarsh.
Posted 29 November 2023, 1:04 pm EST
I have tried it before but same, short-cut not working.
Thanks,
Duyet Le
Posted 29 November 2023, 1:05 pm EST
I have read that before I posted. Short cut still not working. You can try the project that I have upload.
Maybe that is a bug.
Tks,
Duyet Le
Posted 29 November 2023, 1:22 pm EST
Hi wknauf, uttkarsh.matiyal,
I have changed all from C1.Win.C1Ribbon to C1.Win.Ribbon manual, then It work for me.
Thanks,
Duyet Le
Posted 29 November 2023, 1:40 pm EST - Updated 29 November 2023, 1:45 pm EST
Now, after changing I face another problem as the photo.
I could not run the program.
What should I do?
Tks,
Duyet Le
Posted 30 November 2023, 12:57 am EST - Updated 30 November 2023, 1:02 am EST
Hi Uttkarsh,
I am very tired that how to fix it.
_ The error still shown.
_ All my item on ribbon lost icon.
What should I do to fix it.
Tks,
Duyet Le
Posted 30 November 2023, 4:50 am EST
Hi,
do you have a sample that reproduces the problem?
Could you post the line of code from “InitializeComponent” where the icon is set (probably “SmallImage”/“LargeImage”, as you switched from the old to the new ribbon)?
Also, could you check your Nuget package references / DLL references? Do you by any chance reference “C1.Win.Ribbon” AND “C1.Win.C1Ribbon”? Maybe this causes the conflict?
Best regards
Wolfgang
Posted 30 November 2023, 5:52 am EST
Hello Duyet Le,
We are sorry, but we were unable to reproduce the behavior you described on our end.
We tried to test using both C1.Win.Ribbon (latest) and C1.Win.C1Ribbon (classic).
It seems that the error may arise when attempting to add an icon to a RibbonItem by the designer, and the code generator could not generate the code for the same. Our understanding is that this error occurs specifically in C1.Win.Ribbon (latest). Kindly confirm if this is the case.
In alignment with Wolfgang’s suggestion, could you please provide additional details to aid in replicating the behavior and providing appropriate assistance? Specifically, we request the following information:
Alternatively, if possible, could you please update the attached sample or attach a stripped-down sample of your project so that we could investigate the behavior?
I have changed all from C1.Win.C1Ribbon to C1.Win.Ribbon manual, then It work for me.
The behavior of the shortcut not working you mentioned might be occurring for either of the following reasons:
Please try using one assembly at a time to avoid potential ambiguities.
Your cooperation in providing these details will greatly assist us in addressing the issue effectively.
Sample: C1Ribbon_Test.zip
Regards,
Uttkarsh.
Posted 30 November 2023, 11:28 am EST
Hi Uttkarsh,
It seems that the error may arise when attempting to add an icon to a RibbonItem by the designer, and the code generator could not generate the code for the same. Our understanding is that this error occurs specifically in C1.Win.Ribbon (latest). Kindly confirm if this is the case.
Yes, I have attached the video.
Lost Icon C1Ribbon.zip
I have worked with many ways, but could not fix it.
All icons were lost.
Thanks,
Duyet Le
Posted 30 November 2023, 11:30 am EST
Due to the limit of file, I split to 2.
Posted 30 November 2023, 11:32 am EST
Posted 30 November 2023, 11:57 am EST
Hi,
your first zip (“Lost Icon C1Ribbon.zip”), which should contain the project references, seems to be corrupt. The google file does not contain this part.
Best regards
Wolfgang
Posted 30 November 2023, 12:14 pm EST
Hi Wolfgang,
Pls see the following file:
https://drive.google.com/file/d/1YZE6zYRZTrtpX-5BEY3TxIRGT2YtLn8v/view?usp=sharing
The first one is missing the second part as I split to 2 file.
Now, I could not make my project back to normal.
Tks,
Duyet Le
Posted 30 November 2023, 12:19 pm EST - Updated 30 November 2023, 12:24 pm EST
Hi,
that is the same video that you already posted before ;-).
I need information about the “References” section in Solution Explorer:
Could you expand it an post a screenshot?
Best regards
Wolfgang
Posted 1 December 2023, 7:10 am EST
Hello Duyet Le,
We searched our old records and found that this behavior can also occur when all the C1 DLL references are
To verify both the above, please check the properties of all the C1 DLLs so that they are of the same version and being picked from the same location (ref. DLL Properties.png in attachments.zip)
If any reference is picked up from different location OR it is of a different version, please delete that reference and follow the steps in the attached GIF to manually add that reference again (ref. Add reference manually.gif in attachments.zip).
If the troubleshooting steps mentioned earlier do not resolve the issue, kindly consider providing a stripped-down sample that replicates the observed behavior. Alternatively, you may try updating the previously shared sample to reproduce the behavior.
This would greatly facilitate a more in-depth investigation and enable us to provide further assistance.
We appreciate your patience and understanding.
Regards,
Uttkarsh.
Posted 1 December 2023, 8:39 am EST
Hi Ullkarsh,
I have followed what you said, but could not settled it.
Video as the following link:
https://drive.google.com/file/d/1YgkNejDev9DQ6gl4omI4fxKyTmIpMCBU/view?usp=sharing
Thanks,
Duyet Le
Posted 4 December 2023, 7:51 am EST - Updated 5 December 2023, 3:16 am EST
Hello Duyet Le,
We need additional details regarding your license, and due to the sensitive nature of this information, we cannot address it on our public Forum.
To facilitate a more secure discussion, we have generated a private support ticket for your case on our private portal. Kindly proceed to the following case URL and refer to the CAS-45612-P9V7M1 case ID for further assistance:
https://developer.mescius.com/my-account/my-support/
Regards,
Uttkarsh.
Posted 4 December 2023, 9:01 am EST
Hi Uttkarsh,
I have settled it.
I think there are some reasons and may have a bug
_ All project in the same solution need to reference to WinForms install location (C:\Program Files (x86)\ComponentOne\WinForms Edition\bin\v4.5.2). I have one project in my solution was reference to difference location.
_ But after that it was created another problem, when I run it shown: “The type ‘warchousccontrol.Properties.Resources’ has no property named ’Hide_Row”, but I have checked in the “Resources.resx”, it has that. So I have tried many way. In the end, I delete all in licenses.licx file and update it. It’s okay.
Thanks,
Duyet Le
Posted 4 December 2023, 9:02 am EST
Following is the video that I was recorded to show the problem above.
https://drive.google.com/file/d/1Z40_x-sj9Fza1QOdijlaS6OU_R_khuHd/view?usp=sharing
Posted 5 December 2023, 6:40 am EST
Hello Duyet Le,
We’re pleased to learn that your problem has been resolved.
The error you’re experiencing may have various causes. We explored online resources and found a StackOverflow thread that outlines instances where this issue may arise. Please refer to the following StackOverflow thread to determine if your issue aligns with any of the scenarios discussed.
Pay special attention to https://stackoverflow.com/a/32862246 answer.
Regards,
Uttkarsh.