08-12-2010 10:17 AM
I have a cluster of 32 instances of a type def. The type def contains several different control types. What I need to do is change the combo box properties for each of the type defs. Normally I would create an array of references to change properties for each of the type defs, but when I try this I cannot access the String[] properties for the combo box selections. The only way I have found to resolve this is to create a reference for each individual combo box element. This is labor intensive, since I will have 32 elements. Is there a beeter way to do this? The first screen shot shows the issui I am having, not being able to change properties of specific elements within each of the type def's when stepping through a controls[] array. The second screen shot shows the only solution I have found so far, which is not very practical.
Solved! Go to Solution.
08-12-2010 10:30 AM
You will need to cast (to more specific class) the control to a combo box type for the particular control [ ] index that has the combobox if you want access to the combobox.
you can also access the combobox of a cluster by reference directly, rigth click on the control ref and link to the clusters element driectly.
The last option is to make the typdef strictt this will populate all instances with the strings[] list since it is a strict property.
the approach depends on wether you plan on changing the list at runtime.
08-12-2010 10:34 AM
Here is an exaple:
08-12-2010 11:24 AM
The first approach, cast to a more specific class, resolved the problem. Approach 2 I had already tried and was too inelequent for 32+ typedef clusters. Approach 3 would not work since changing properties needed to be dynamic within the program. I had 3 different combo boxes within the typedef, so to select the right one to update I checked the label name and made that the condition for changin the properties. See working code below.