Alex Gordon
Alex Gordon

Reputation: 60691

Pushing a list of colors into colordialog.customcolors

I have a list of colors i.e.: "1323523, 12342, 2354, 356234, 234234"

Each of these numbers stand for a color. I would like it so that when there is colordialog.showdialog, this list of colors shows up in the colordialog custom boxes.

this is how i am doing it currently, but for some reason the customcolors are not being added. i know for a fact that my array is good because i checked it.

Dim numberStrings = My.Settings.mytext1.Split(","c).Select(Function(x) x.Trim())
            ColorDialog1.CustomColors = numberStrings.Select(Function(x) CInt(x)).ToArray()

Upvotes: 1

Views: 371

Answers (1)

Daniel A. White
Daniel A. White

Reputation: 190897

Here is the documentation on the CustomColors property.

http://msdn.microsoft.com/en-us/library/system.windows.forms.colordialog.customcolors.aspx

Upvotes: 2

Related Questions