Programmatically Editing Items in a Combobox, Menu Ring, or Text Ring

Updated Apr 3, 2018

Reported In

Software

  • LabVIEW

Issue Details

I would like to modify the text displayed in a combobox, menu ring, or text ring, but the data type of the control or indicator is not a string. How can I programatically modify this text?

Solution

  1. On your block diagram right-click on your combobox, menu ring, or text ring control or indicator and select Create»Property Node
  2. Select the property Strings[] from the list of available properties by left-clicking the node. Notice that the expected input is an array.
  3. Right-click on the property node and select Change All to Write.
  4. Wire the output of your string array to the Property Node; see Figure 1 below for an example

Figure 1: Writing item name strings to the Strings[] property node

Additional Information

Editing the strings in the control or indicator won't affect the index of the selection on the front panel control. This is instead modified by changing the value of the control. This can be important to keep in mind when repopulating a ring with less values than it previously contained.

WAS THIS ARTICLE HELPFUL?

Not Helpful