cyotek / Cyotek.Windows.Forms.ColorPicker

Color picker control suite for Windows Forms applications.
http://cyotek.com/blog/tag/colorpicker
MIT License
149 stars 41 forks source link

ColorGrid modifying added custom color #16

Open warwolf7 opened 6 years ago

warwolf7 commented 6 years ago

Hi, A big thank you for your tool, I love it! I'm using the colorgrid, and I'm adding the customcolors based on the latest customcolorcollection that the user used. So everytime my dialog is closed with the OK button, the software keeps the CustomColors collection in a public collection. Then when the user reopen the color grid, his latest customcolors are reinserted like this If MyCustomColorCollection IsNot Nothing Then my_colorpicker.CustomColors = MyCustomColorCollection If the user dblclick on those custom colors, modify one and click ok, i get this message System.Collections.Generic.KeyNotFoundException: 'The given key was not present in the dictionary.'

and the line 482 of colorgrid.cs is highlighted. If I'm doing something wrong, let me know. I would like to use those user customecolor as much as possible

cyotek commented 2 years ago

Hello,

Apologies for taking 3 years to respond to this. I've just tried to reproduce your issue but wasn't able to. Bit of a long shot, but can you remember how you were trying to use the control, e.g. if there were any other actions you were doing prior to setting the custom collection?