LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I populate the combo box programmatically using a set of comma delimited strings or 1D-array

Typically, my application will read a section of a
config file for product entries to be stuffed to the
combo box. I've got the part that reads the file, get all the Keys from the config file and stuff them into an array (or comma delimited string). The problem I
have is how to populate the combo box on the fly after reading entries read from the config file.

The code needs not be fancy. I just need something that puts two to three entries
into the combo box (NOT a list ring) programatically.
0 Kudos
Message 1 of 3
(3,082 Views)
The entries can be read and written using the Strings [] property of the combo box, exactly the same way as for a list ring. So if you already have the entries in an array just create a property node, select the strings property, set it to write and wire the string array to it. If you don't have it as a string array you can e.g. use the read spreadsheet function and tell it that the delimiter is a comma and it will give you the string you need to wire to the property node.
Message 2 of 3
(3,082 Views)
Thanks a lot for the speedy response. Although I've got your answer an hour after posting it, I was unable to work on it till this morning (12/29/03)because my PC is at work. Believe it or not, I was actually looking forward to going back to work today to try your suggestion. I'm delighted that it worked as you had it outlined.
0 Kudos
Message 3 of 3
(3,082 Views)