Only like this
Code:{ private void checkBox[i]_CheckedChanged(object sender, EventArgs e) { for(int i = 0 , i < 5 , i++) //code... } }
is it possible to do something like:
Code:for(int i = 1 , i != 5 , i++) { private void checkBox[i]_CheckedChanged(object sender, EventArgs e) { code... } }
Only like this
Code:{ private void checkBox[i]_CheckedChanged(object sender, EventArgs e) { for(int i = 0 , i < 5 , i++) //code... } }
Yet, you are a pathetic human.
Contributor since: 7.26.2012 - ended
Donator since: 7.14.2012
Last edited by stevonator; 08-16-2012 at 08:34 AM.
Select all the checboxses
Go to the events and create the changedchanged event thing.
Do the event there.
Note: You need to think a little bit about how to do it.
It's not as easy as I make it sound :P
(I did this once, but then I used a loop for a check. As I showed you earlier in another thread...)
Code:{ private void checkBox[i]_CheckedChanged(object sender, EventArgs e) { //Initialize a temporary integer for the loop count. You loop 5 times. Thereafter you stop looping. it gets triggered by pressing the button for(int i = 0 , i < 5 , i++) //code... } }
Yet, you are a pathetic human.
Contributor since: 7.26.2012 - ended
Donator since: 7.14.2012
Well depends on what it will do
you have as shown:
for = Doing something for...Code:for(int Integer = 0; Integer != 10; Integer++)
int Integer = 0 = Creates an integer that holds the value 0
Integer != 10 = Will do the for aslong as Integer is NOT equal to 10
Integer++ = Increase the Integers value with one each time it finish the for (loop)
while = Do something while the value is not true/falseCode:while(Value)
Value = the value it will use to check.
Like:
Code:int i = 0; while(i != 10) i++;
Last edited by Jorndel; 08-17-2012 at 09:37 AM.
Last edited by Eidolon; 08-17-2012 at 11:06 AM.
Yet, you are a pathetic human.
Contributor since: 7.26.2012 - ended
Donator since: 7.14.2012
X,x
Seems you need to studdy a bit more on that :|
Was just an example on HOW he could use a while loop.
For all I care he can use a bool as the while value...
It's all about helping the user to understand what the code does.
And not just give them a code and say: Do that or put that there.
Then he would maybe have to ask us again for this in 4 weeks or so...
It's more about the user-focuse rather then the expertise of the answer. (That helps as well)
But having a noob telling you how to do it instead of a geek.
Some MIGHT not understand a geeky way but the nooby way is more on his level.
Or who ever that needs help.
Eidolon (08-17-2012)