LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the properties of individulal elements in an array?

Hi all,
 
I have an array (size is 25) of string and I want to disable and grayout half of them. But how do I do it? How do I change the properties of individual elements in an array? I have tried to use some of the examples given in the discussion forums, but it didint work for the task mentioned above. Anybody would be able to help me with a suitable example that can be specifically used for disable or enable the individual array  elements?
 
Dev
0 Kudos
Message 1 of 4
(2,462 Views)
This will not work. Each element in an array has identical properties. You could for example use a cluster instead.
0 Kudos
Message 2 of 4
(2,454 Views)
If you want to erase (or gray-out) a particular string element of the array, you could right-click it, choose Data Operations--->Delete Element.
Doing this changes your array size, but if you are erasing the last contiguous half of the array on the control object, this may not be a problem.  The user will see the first half of the string elements filled-in and the lower half grayed-out (to be filled in later).  Make a test VI, play around.
0 Kudos
Message 3 of 4
(2,440 Views)


@Telemaque wrote:
The user will see the first half of the string elements filled-in and the lower half grayed-out (to be filled in later).  Make a test VI, play around.

... except that all elements "greyed out" with this method contain the default string for the array element (blank by default, but changeable). There is no way to have meaningful, unique text in the greyed out elements.
 
I would suggest to use a listbox as control/indicator. Here elements can easily be disabled programmatically.
0 Kudos
Message 4 of 4
(2,428 Views)