0
我想要做一个表单,用户可以选择一个预定义的调色板在图表中使用,我该怎么做?如何向用户显示预定的调色板vb.net
我不希望用户使用colorDialog按颜色选择颜色,而是选择整个调色板。如果它是可行的,我希望表单显示它像一个连续的酒吧。
感谢
我想要做一个表单,用户可以选择一个预定义的调色板在图表中使用,我该怎么做?如何向用户显示预定的调色板vb.net
我不希望用户使用colorDialog按颜色选择颜色,而是选择整个调色板。如果它是可行的,我希望表单显示它像一个连续的酒吧。
感谢
那么我搜索了很多,但没有找到它,即使它是很常见的很多程序。最后做了很长的路,我将代码添加到任何可能感兴趣的人。
Private cBerry() As Color = {Color.BlueViolet, Color.MediumOrchid, Color.RoyalBlue, Color.MediumVioletRed, Color.Blue, Color.BlueViolet, Color.Orchid, Color.MediumSlateBlue, Color.FromArgb(192, 0, 192), Color.MediumBlue, Color.Purple}
.
.
.
Private cPastel() As Color = {Color.SkyBlue, Color.LimeGreen, Color.MediumOrchid, Color.LightCoral, Color.SteelBlue, Color.YellowGreen, Color.Turquoise, Color.HotPink, Color.Khaki, Color.Tan, Color.DarkSeaGreen, Color.CornflowerBlue, Color.Plum, Color.CadetBlue, Color.PeachPuff, Color.LightSalmon}
cBerryLbls = {Label1, Label2, Label3, Label4, Label5, Label6, Label7, Label8, Label9, Label10, Label11}
.
.
.
cPastelLbls = {Label12, Label13, Label14, Label15, Label16, Label17, Label8, Label19, Label20, Label21, Label22, Label23, Label24, Label25, Label26, Label27}
labls = {cBerryLbls,... cPastelLbls}
colores = {cBerry,... cPastel}
Dim labs As Label()
Dim colori As Color()
For i As Integer = 0 To colores.Length - 1
labs = labls(i)
colori = colores(i)
For j As Integer = 0 To labs.Length - 1
labs(j).BackColor = colori(j)
Next
Next