08-23-2011 02:58 AM
Hello all,
Can we change the property of the elements of an array. For example:
I have an array of combo-boxes. Can i have such a scenario that different combo-boxes of the array will have different items to select an item.
I am able to set the different "values" in different combo-boxes bu using "to be more specific class" property node.
But i could not set the different item list in different combo-boxes.
Please give me the solution.
08-23-2011 03:37 AM
I do not think you can achieve what you want, as then the elements in the array are no longer "strictly" of the same type.
If you know beforehand how many elements you want, you may be better off just using a cluster which will allow you to do what you want.
08-23-2011 04:15 AM
Hello Ankit,
at first I wanted to write a reply similar to nrp's. But with the combo- box there is a little difference to menu rings that makes it possible to have different menu entries. It is necessary to have "Allow undefined Strings" checked. Then You can attach different Strings[]- Lists to the control when clicked with the mouse. I attached a simple VI to show the principle.
Greets, Dave
08-23-2011 05:56 AM
Thanks Dave,
now I have learned something for today
08-23-2011 08:41 AM
In terms of the original question: This has been asked MANY times, and a simple search would have yielded the answer. With an array the only thing that can be different amongst the elements is the value. All elements share the same properties. If you need different properties then you need to use a cluster, and you can use the previous suggestion.
08-23-2011 08:58 AM
Thanks a million dave!!!!!
I have learnt a very new and innovative thing...
I just wanna ask you one more question in the above context.
Can i have listbox or combo-box in a table just like in an excel sheet where we can have listbox by using "data validation" property for different cells having different list.Can i have this in labview. Because for this i have to super-impose the combo-boxes on the table and treat them separately.
We have to take those combo-box values and put in table and then store it.I have attached one VI to show the scenario.
And this is the alternative solution of the array problem which u have already given. So please suggest me between the two or any alternative solution.
Thanks,
Ankit Madaan
08-23-2011 01:21 PM
@Ankit Madaan wrote:
Thanks a million dave!!!!!
I have learnt a very new and innovative thing...
I just wanna ask you one more question in the above context.
Can i have listbox or combo-box in a table just like in an excel sheet where we can have listbox by using "data validation" property for different cells having different list.Can i have this in labview. Because for this i
This has ALSO been asked many times and the answer is always the same: no. You have to play tricks like using separate controls and moving the controls to the appropriate location if you don't want to use separate controls for each and every cell (like you did).
08-23-2011 02:51 PM
Almost. The Position property is different for different elements.
08-23-2011 03:03 PM
What is the "position property"?
08-23-2011 03:49 PM
Probably referring to the Array Element.Position property. This is a property of the array container and not of the array elements since any element could appear in any of the positions.
Let's not even go the "value is a property" route.