LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

filling large array into multicolumn listbox

Hi,
I need to fill a multicolumn listbox with a large array. I feed a 2D array into the ListNames property. The problem I am having is that if the array is large (+1000) it is taking forever to update the itemnames. Is this because the listbox is going through a resize? Is there someway to intialize the ItemNames array to speed up the insertion. It is also slow if the next array insertion (overwrite) is a small array.

thanks Michael
0 Kudos
Message 1 of 2
(3,115 Views)
Hi Michael,

Please take a look at the attached VI.

This VI allows the user to programmatically (during run time) write data to a multicolumn listbox. The VI uses the control reference to a multicolumn listbox, so this VI will work on any multicolumn listbox. The VI has inputs for the 2D array (of strings), and a start location (row and column) where the zeroth (top left) element goes. The VI returns the end row and end column of the multicolumn listbox. This is useful for writing successive entries to the listbox.

In this vi, I am currently writing a 1000*10 2D array to a multicolumn listbox and it runs very fast.

Regards,
Ankita A.
0 Kudos
Message 2 of 2
(3,115 Views)