Programmatically Edit a ComboBox in LabVIEW NXG

Updated Sep 14, 2020

Environment

Software

  • LabVIEW NXG
  • LabVIEW NXG Web Module

How can I programmatically change the contents of a Combo Box in LabVIEW NXG?

In order to programmatically change the contents of a Combo Box you should use a Property Node. 

To accomplish this goal, simply follow these next steps:
  1. On the Block Diagram, right-click on the created ComboBox control or indicator and then click Create reference.
  2. Insert a new Property Node on the Block Diagram and wire the recently created reference to the Combo Box in the node of the Property Node. 
  3. Select the property named Items from the list of available properties. Notice that the expected input is a 1D Array of String. This1D array will correspond to the items to be displayed by the ComboBox.  
  4. Wire the output of your string array to the Property Node; see the figure below for an example: 
This will update/replace the items of the ComboBox with the ones you defined in the array.