How can I assign a list of custom colors to a ColorDialogForm?
Thanks,
Jim
2 Answers, 1 is accepted
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.