This is a migrated thread and some comments may be shown as answers.

Custom Colors

2 Answers 49 Views
ColorDialog
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
Veteran
James asked on 24 Jun 2020, 03:44 PM

I see that the CustomColors[] array is read only.

How can I assign a list of custom colors to a ColorDialogForm?

Thanks,

Jim

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 26 Jun 2020, 11:39 AM
Hello, James,  

Indeed, RadColorDialog offers the CustomColors array which is read-only. It is purposed to be loaded from a configuration file or you can save the currently available custom colors from the dialog to a configuration file. 

The RadColorSelector.CustomColorsConfigLocationNeeded event fires when custom colors configuration is about to be saved and loaded at a later moment. In the CustomColorsEventArgs you have the option to change the location  of the custom_colors.cfg. When creating the CustomColors, RadColorDialog checks whether a custom_colors.cfg file exists to load the colors. The default location is C:\Users\'User Name'\AppData\Local. You can create a default file with a predefined set of colors at the specified location. Thus, the desired colors will be loaded. 

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
James
Top achievements
Rank 1
Veteran
answered on 30 Jun 2020, 12:17 PM

Hello Dess,

Thank you! I will implement that. I was unaware of the CFG file. That actually helps a lot.

Best Regards,

Jim

Tags
ColorDialog
Asked by
James
Top achievements
Rank 1
Veteran
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
James
Top achievements
Rank 1
Veteran
Share this question
or