LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array of cluster color change

I have an array of clusters that I'd like to change the color of each cluster programatically. I've attached the cluster hoping for some help. I'd also like to be able to disable some clusters while enabling others. Is this possible? is there a better way to do what i want?
0 Kudos
Message 1 of 4
(3,596 Views)

If I were making a list of hard-and-fast rules in LabVIEW, high on the  list would be the following:

 

All elements of an array must share the same properties

 

In a case like this I would typically consider using a cluster of clusters instead of an array of clusters.  You lose a little flexibility in that the number of elements is fixed, but that is often not a problem.  You can still use Cluster to Array and Array to Cluster to make your programming life a little easier.  Use arrays to do the work and the cluster for your UI.

0 Kudos
Message 2 of 4
(3,580 Views)

Hi Joe,

 

There is a way for you to change the color or disable a control programmatically, but like Darin said, you wouldn't be able to do this per element through an array. I urge you to go with his recommendation of using a cluster of clusters.

With regards to the necessary programming, a property node should do the job.

 

Property Node.png

 

Best Regards,

Joshua de la Llana

Applications Engineer

NI ASEAN

0 Kudos
Message 3 of 4
(3,558 Views)

One of the standard ways to deal with that problem is to use a color box or picture ring as part of the cluster. Arrange the color box to be in the back of the other indicators. Then handle the color of the color box as normal data (by-val as opposed to the by-ref of the properties).

 

Felix 

0 Kudos
Message 4 of 4
(3,542 Views)