Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Indexing checkboxes

Status
Not open for further replies.

GazNew

Instructor
May 3, 2005
30
0
0
GB
I am beginning to spot that VB6 and VB 2003 .net are VERY DIFFERENT - and not always in a good way!

Anyhow, I used to give checkboxes the same name but differing indexes (similar to array building) and this meant that I could cycle through each check box quickly and easily. Under .net indexing does not seem possible and so I have had to name them sequentially (for example chk1, chk2, etc). Am I wrong and indexing is possible or am I missing something obvious and new?
 
Thanks for this. I can see how the handles feature is powerful and in fact have now built this in to place but the feature I seem to be missing or not thinking laterally enough is that I could create a loop to cycle through each object to check it's status or change it. So, imagine I have 18 checkboxes and only two can be active (any two) then I would have created an index of checkboxes, this would have given me a single subroutine that I could then check to see if two were checked and if so, either reset all or simply switch off the last one clicked. Now with handles I run a single subroutine again and I can use booleans to check if my two concerns have been met but what property will now let me reverse the checking of the checkbox clicked on that caused the subroutine call the third or subsequent times?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top