LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to "Grey Out" 2D array element?

I have an array of clusters where each element in the cluster represents a sensor. My vi records the time of the last update sent by each sensor and, if the elapsed time since the last update is too long, displays a popup error message alerting the user.

I want to change from generating a popup to something similar to "greying out" the array element. (like one can in a listbox). From what I understand, arrays don't have a Disabled Items[] property. What is the closest I can get to showing a naive user if an element is active without taking up the real estate of a boolean "active" indicator?

0 Kudos
Message 1 of 7
(3,913 Views)

You could use a text ring to display the values rather than an array indicator.  Text rings have the ability to disable items.

 

Edit:  Just noticed you said 2D array element (and array of clusters).  I need to pay more attention. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 7
(3,901 Views)

One of the fundamental aspects of an array is that each element has the same appearance, differing only by the values.

 

So you need to accomplish this change by using a value change.  The best way to do this visually is generally to add a color box control to your cluster, hide its label, move it so that it's behind all of the other elements, change the background of all other elements to transparent, and then you can use the color box to highlight the entire array cell a color that informs the user that something is good/bad/whatever.

Message 3 of 7
(3,898 Views)

Yes as mentioned array elements can only vary by value.  In the past a color box is a good solution.  Here is one example I posted on a large grid like UI with a color box as the background for status.

 

https://forums.ni.com/t5/LabVIEW/How-to-handle-40-of-the-same-little-GUI-s/m-p/3615868#M1013866

Message 4 of 7
(3,870 Views)

To emulate the "disabled" function is a bit trickier - and clunkier.  I've seen people place a transparent decoration over the element that needed disabling so you couldn't click the control underneath.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 5 of 7
(3,860 Views)

How many indicators are in each cluster. You could place a flat boolean over each element that is transparent if true and opaque if FALSE, doubling the number of cluster element in each array element.

Message 6 of 7
(3,848 Views)

@altenbach wrote:

How many indicators are in each cluster. You could place a flat boolean over each element that is transparent if true and opaque if FALSE, doubling the number of cluster element in each array element.


For additional information:

Each Cluster is arranged vertically holding two string indicators, one cluster with a string and a boolean (arranged horizontally), and one cluster with a string and a picture (arranged horizontally)

Capture2.PNG

I chose this format as I dynamically resize the array and the clusters inside to fit all elements on screen (as per here and here)

0 Kudos
Message 7 of 7
(3,828 Views)