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:
- On the Block Diagram, right-click on the created ComboBox control or indicator and then click Create reference.
- 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.
- 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.
- 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.