From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Listbox not connecting to array.

Hi, in this code I uploaded I tried to connect a listbox to an array with i32 numeric. But I am not able to connect as it shows an error, the source is long 32 bit integer and sink is an array of long 32 bit integer. The thing is I was able to connect in a program I did some time back. I dont remember how. I obviously did it with the help of some online material. I  have copied that listbox into this program and I connected it to an array and it did connect. I have been trying to find out what is the difference between both the listbox and I couldnt find out. So I need your help. Please help me find what is the difference between the two listboxes. I have uploaded the code. Thanking You.Listbox problem.PNG

0 Kudos
Message 1 of 3
(2,651 Views)

Right-click on the list box and select the option to allow multiple selections.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(2,642 Views)

A Listbox can work like a radio control, where only one item can be selected, and if you select a new item, the selected item is deselected.  There are times this is the type of functionality you want.

 

But then there are times when your user maybe able to select multiple items, this is like in Windows Explorer where you select multiple files and can perform a copy on all of them at once.  The Listbox control (and multicolumn listbox control) gives you that flexibility to allow for only selecting one item, or multiple.  When you do this the controls data type changes to be an array of indexes, or just a single index which is seen as a scalar.

 

Of course if you want to user to be able to select multiple items, in a more traditional UI like environment you may want to check out the Listbox Item Selection code I posted, where a user can select the items they want by clicking check boxes.

Message 3 of 3
(2,571 Views)