closet geek Posted April 21, 2006 Posted April 21, 2006 I have a checkbox_changed event. Inside that event I have two for loops, one performs the exact opposite action of the other (e.g. if one painted a textbox black the other would paint it white). When the checkbox is checked by the user I want one of the loops to run, when it is unchecked I want the other loop to run. How do I go about doing that? Quote
Administrators PlausiblyDamp Posted April 21, 2006 Administrators Posted April 21, 2006 private void checkBox1_CheckedChanged(object sender, EventArgs e) { if (checkBox1.Checked == true) { //do whatever should happen when it is checked } else { //do whatever should happen when it is not checked } } Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.