|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Color Dialog Custom colorsHi everyone/anyone,
I am using a button in my app that opens the color dialog, and allows the user to select a color which changes the backcolor of a label. I then store the color in my db as a hash value, since i found this to be the easiest way to store it. However, i want the user to be able to add custom colors. When they create a custom color within the dialog, it is not saved there on returning to the dialog. I was thinking about storing the custom colors in a file, then reading this file into an array each time to populate the custom colors of the dialog, and then re-writing the color values to file in order to retrieve them at a later time. I am having problems finding an example where someone is saving the custom colors that are created by the user. Am i going about this the correct way? Any insight would be greatly appreciated!
Show quote
Hide quote
"J-Rod" <baconbits***@gmail.com> wrote in message Never tried in dotNet but.... here's an extensive (2 line <g>) sample.news:1144851607.613148.300430@i40g2000cwc.googlegroups.com... > Hi everyone/anyone, > I am using a button in my app that opens the color dialog, and allows > the user to select a color which changes the backcolor of a label. I > then store the color in my db as a hash value, since i found this to be > the easiest way to store it. However, i want the user to be able to > add custom colors. When they create a custom color within the dialog, > it is not saved there on returning to the dialog. I was thinking about > storing the custom colors in a file, then reading this file into an > array each time to populate the custom colors of the dialog, and then > re-writing the color values to file in order to retrieve them at a > later time. I am having problems finding an example where someone is > saving the custom colors that are created by the user. Am i going about > this the correct way? Any insight would be greatly appreciated! ColorDialog.CustomColors Property http://msdn2.microsoft.com/en-us/library/system.windows.forms.colordialog.customcolors(VS.80).aspx -- Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com Please keep all discussions in the groups.. Thanks Ken. I found the same example after i posted and was able to
work something out for my situation. |
|||||||||||||||||||||||