Picturebox as a colorbutton

Started by Christina, April 11, 2015, 05:04:24 AM

Previous topic - Next topic

Christina

Hello,

I study the picturebox as a “colorbutton” from Fred Tomke…
http://www.opendcl.com/forum/index.php?topic=1654.msg8213


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





Fred Tomke

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
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

Christina

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