Simulating arrays with LabVIEW XControls
Channel: BurritoDog Software
Date: 2015-03-11

I demo my implementation that makes it seem like you have an array of xcontrols in LabVIEW.

With this implementation you manually construct the array layout on the front panel of a VI and pass in references for all of the XControls you have placed on the front panel as well as the scrollbar you are using. This would also work exactly the same with horizontal scrollbars. A separate array, that can be hidden or pushed out of view on the VI, is then created that contains the block diagram data type of the control to store each index's value. For XControls this corresponds to the Data cluster type of the XControl.

Some caveats:
The data cluster of the XControl may have to be larger than normal usage of an XControl would be. This is due to the data being shuffled around using Value property nodes. This means that all data responsible for the look and functionality of a specific XControl instance needs to be available via that Value property. Most of the controls you normally place in the XControl's State cluster will probably need to be moved to the Data cluster.

Also, the Data Changed event within the XControl's facade VI should have light and quick functionality. This event case should only be used to immediately update the front panel of the XControl from values available in the Data cluster. Anything that requires time to process should be handled elsewhere so that functionality of the array behavior isn't diminished.