From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-09-2019 02:22 PM
We all know it is easy to show/hide the individual items in a Cluster using the items’ “Visible” property nodes. However when the Cluster is now inside an Array (Array of Clusters), this may not have the desired effect. You could still use the “Visible” property nodes, but now this will take effect on all elements in the Array. You cannot Show/Hide the Cluster’s items in only one or a few elements of the array. This is because the property nodes affect all elements of the Array in the same way.
Suppose you want to create a User Interface containing an Array of Clusters, (for example a Sequence where each element is a Step in the Sequence). You want to show only relevant items in the Cluster, and hide the rest, but on an Array element by element basis. I have been faced with this situation numerous times so this is a common enough scenario. So I decided to share my solution for that. This procedure shows with an example, how to do just that.
Please see the PDF document for procedure and the VI example.
Hope this is helpful to others. If there is sufficient interest, I can post a follow-up on how to change more complex properties (Strings[] used in Combo Box, Ring Menu, etc) of items in an Array of Clusters.
07-09-2019 02:45 PM - edited 07-09-2019 02:52 PM
H LVUser,
so you hide FP elements by placing them behind a (boolean) element with customized images…
Not new (the same principle is used to place colorboxes behind cluster elements to allow individual colors in arrays of clusters) - and also kind of tricky as is visible in your example VI!
(Don't take me wrong, I really appreciate your effort in creating that example VI together with a full PDF document. I just want to point some problems with your current state of that approach.)
07-09-2019 03:09 PM - edited 07-09-2019 03:16 PM
Hi GerdW
Thanks for your comments. I too have used Colorbox control to give the appearance of changing colors of items individually. But there is a problem when using it Show/Hide. First, the Colorbox has a T on it when you make it transparent. Second, even when it is transparent, it won't let you control the item behind it. So it may work if you just want to use the items as indicators but will not work if you want to allow user to change the control behind the Colorbox.
Regarding your comment about the Boolean not covering one of the items, it is a trivial problem to fix 🙂
I have never used the windows-style controls, but that too is an easy one to avoid !
Another solution I have used in the past is to use a Multi-column listbox. Each row contains one element of the array. Each column represents one item in the Cluster. Then use floating pop-ups to allow use to edit each element based on the Mouse Down events.
Sundaram Raghuraman
CLD (to be renewed!)
LabVIEW User 3.1 -> 2018
08-22-2019 03:51 PM
Follow-on Example #2:
This image shows an Array of Clusters in which the value of the "Element Type" is used to unhide only the relevant control in the Cluster, and also set the Strings[] property of the combo-box control appropriately.
Also enclosed is the LabVIEW VI for this example.
08-23-2019 02:11 AM
I haven't tried, but can you put a Tab control in an array? If so, you should be able to have different tabs at the different indexes and thus different control setups. Xcontrols?
/Y
08-23-2019 08:29 AM
Tabs cannot be inserted into any other container. I think they are meant to be at the highest level.
Same restriction with Splitters.
I have not looked into XControls. But worth taking a look I think.
Thanks for your comments.