PredefinedPalette.User - how do I define the palette?


Author
Message
Kevin Harrison 1
Kevin Harrison 1
Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)
Group: Forum Members
Posts: 176, Visits: 1.9K
Perhaps I'm doing this wrong, but I decided to use an NPaletteColorPane to display a set of colours which the user can select.
The thing is I want to use my own colours not one of the two predefined palettes. I can do the following:
            NArgbColorValuePalette nevronPalette = new NArgbColorValuePalette();            nevronPalette.SetPredefinedPalette(PredefinedPalette.User);
but the Help gives me no clue how to define my own paltee from an array of Color.
Or, is there a better way to achieve this?
Thanks
Kevin
PS It shouldn't be this hard 

Reply
Kevin Harrison 1
Kevin Harrison 1
Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)
Group: Forum Members
Posts: 176, Visits: 1.9K

Thanks. I got round it by checking if the selected index was the same as the last one and ignored it if it was. This does mean that the same colour can't be selected twice in succession but that's reasonable for my application.

Kevin


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search