|
-
Jan 22nd, 2013, 03:53 PM
#1
Thread Starter
Member
[RESOLVED] Color Change Question
I'm working on a program that requires an object to change colors each time a user clicks it.
The object I am trying to edit is a "Panel".
So, what I've done so far:
I've double clicked the panel, loading the code in the code window.
I set the declaration to "MouseClick", and added the following code:
Panel1.BackColor = Color.Blue
This works without a flaw - the program loads with the panel being the default color I chose.
Once clicked, the panel changes to blue - perfect.
The only problem is, I cant figure out how to add additional colors to the equation.
I've got about 15 colors I would like to use.
Each time the user clicks the panel, I would like it to move to the next color on the list.
When the last color is reached, I would like the list to start back over.
So, I'm not sure how to add multiple colors, and I'm not sure how to create the loop that will restart the set once the last color is reached.
Any help would be greatly appreciated!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|