Using a loop to fill an 'array' of check boxes
I have a series of checkboxes named cbS1 through cbS20 and I set 'Count' as an integer.
What I need help doing is taking the value of count and check the checkboxes that are greater than the count.
example: count = 7 so checkboxes 8-20 would be checked.
Im not sure how to m开发者_开发知识库ake an array out of the checkboxes to use in a loop.
You should store your checkboxes in a single array instead of having 20 different cbSxx objects. Read http://msdn.microsoft.com/en-us/library/wak0wfyt.aspx for an idea of how to do that.
Once you have them in an array, you can use a loop to check the ones you want.
精彩评论