10-05-2017 10:30 AM
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?
10-05-2017 10:41 AM - edited 10-05-2017 10:44 AM
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.
10-05-2017 10:41 AM
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.
10-05-2017 11:45 AM
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
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
10-05-2017 11:53 AM
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.
10-05-2017 12:02 PM - edited 10-05-2017 12:19 PM
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.
10-05-2017 12:56 PM
@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)
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)