04-30-2007 01:14 AM
04-30-2007 02:28 AM
In an array all elements have the same properties, they all must be of the same type and you can't change the actual cluster control into an array, only the cluster data.
Those are three reasons you can't change to an array. If you want an array of references to all the controls in the cluster, you can use the cluster's Controls[] property which returns an array of references sorted by the cluster order. You can identify specific controls by their labels, but note that this will break if you change the controls labels later without updating your case structure. Another option is to create a reference for each control and go over them in a loop.
04-30-2007 04:11 AM
04-30-2007 04:33 AM - edited 04-30-2007 04:33 AM
04-30-2007 06:04 AM
To further simplify the example posted by Gerd (since you need 50 cases and not just 2), you can wire the string into the case selector. Consider right clicking the case structure and making it case insensitive.
My personal preference would be using an explicit reference for each control instead of relying on their labels, but with 50 controls, that would make your diagram messy and using the labels is legitimate as long as you make sure not to change them.