In LabVIEW 2010 I have a ListBox Control. How do I get a list of the Item(s) that the User selected in the ListBox?
I don't see any Method, Property or Event that would provide this information.
Solved! Go to Solution.
The value of the listbox are the indices of the elements selected.
If you allow the user to select '0 or more' elements, the datatype will change to an array.
To get the names of the selected elements (I guess that's what you're interested in), you should indes the 'Item Names' property.
You can use the list box itself or a value property node to get the indeces of the items selected. The following picture shows that items one, two, and three were selected. The Selected Items array contains the indeces of the selected items. You can use these indeces to get the selected item names.
Hi, How can I make a list that each item in the list has a certain vaue or string which appears in the output, for example I have a list from 1 to 10, eash number has a correspndance string, ths sting appears in the output.
I think your question was already answered in the previous post on this thread... the code uses a property node to output the choices the user selects. However, if you don't want to do it that way, and you want the user to select a number (say 0-9) and then output a string associated with that number, you could create an array of strings you want them to choose from and when the user selects the number it will correspond to an index of that string array.
I hope that helps!
I have been trying to find the selected item in labview 2011. I cant find it anywhere. Can you please help me access the selected item in labview 2011. Thank You.
The Selected Item indicator is simply an array of I32 numeric indicators that is wired through to the listbox. By creating an array of I32's, when wired to the list box, it will pull the numeric representation instead of the string.
I've posted this many times on the forums, but it is some wrapping code I wrote that makes selection of items in a listbox, or tree, eaiser for the user and developer. Selection is done by clicking the check boxes, with right click for select all / none. Visually I think this is more what users of sofware are expecting, not the normal LabVIEW situation where you need to hold Shift, or CTRL.