ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Initialize Listbox

I have a listbox I'm using as a multi-plot legend AND a selector of which plots are shown, that can be changed at run time (i.e. by selecting a plot name in the listbox, it sets that plot to visible).
 
I want to initialize the listbox so that every item in the plot names column is selected when the VI is first run (i.e. when the VI is first run I want the listbox control to return an array with every index of the rows in the listbox). This will cause all the plots to show, whereas currently if I stop the VI, then re run it, only the plots previously displayed will be shown. The number of plots varies from run to run, so I can't just create a constant.
 
Any ideas?
 
Michael
 
0 Kudos
Message 1 of 3
(7,399 Views)

Quick and dirty, but it does the trick:

Message Edited by Marc A on 01-25-2007 10:51 AM

0 Kudos
Message 2 of 3
(7,395 Views)
Actually it would be better to use the Item Names property and get the size of the array returned to wire to N in that for loop. The Number of Rows property returns the number of visible rows in the listbox, not how many items there actually are.
0 Kudos
Message 3 of 3
(7,389 Views)