Picturebox as a colorbutton

Started by Christina · 2015-04-11 12:04 UTC · 2 replies · SMF topic #2253

Hello,

I study the picturebox as a “colorbutton” from Fred Tomke…
{2}

Have put in the form 4 picturebox and want to fill them with my defaults by the Initialize… and let them work like the first one.
I can write all the code 4 times for the 4 pictureboxes…  but can I solve this with an Array or another way?
The code will stay shortly especially by 100 colors…

If you think this is possible can you give me little example  :-[

Thank you to read this,
Christina




Attachments
Hi, Christina, I've created a simple sample to demonstrate, how I would solve for a known number of Colors. Hope that helps.
For an unknown number of Colors I'd prefer a grid.
Regards, Fred
Attachments
Hello Fred Tomke,

Yes Fred this help me a lot!
Long time i where searching for something like that… I love minimalist and this take no much place in a form…
So, I like the idea very much, every color need to color my layer, you are very smart  :)

Thank you very much,
Christina