LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array of multicolumn listbox

I want to have an array of multicolumn listboxes as an indicator for data monitoring on device testers.
 
Each test system has 16 devices and there are 10 elements to display.
 
I would like to set it up so that the user selects the device tester that they wish to monitor and have use that value as the index into the array.
 
Problem is that when I write values to the mclistbox using the ItemNames property, the value that I write appears in the listbox on all 20 array elements.
 
Is there a way to do this, or do I have to revert to VB?
 
Is there a better way to display this data.
 
I don't have this problem when I use a three-dimension array of strings, but then all array elements have to have the same physical size.  Not very pretty.
 
Any ideas are appreciated.
Solutions are really appreciated.
 
0 Kudos
Message 1 of 7
(4,030 Views)

After some further test, I found that the Value property of the listbox is used to indicate/select a highlighted row (no documentation that I could find explained this).

The ItemNames property updates the entire listbox, not just the selected cell, wasn't expecting that either.

I am still stumped and I need to keep what precious little hair I have left.

I am hoping that there is something very obvious that I am missing.

Edit:  Something that I just realized.  If nothing else I can make 20 multicolumn listboxes and put them on top of each other and only make one visible (essentially the array index).  I hope there is something better.

 

 

Message Edited by jspaarg on 02-28-2006 05:35 PM

0 Kudos
Message 2 of 7
(4,020 Views)

Why not just have a single multicolumn listbox, and write to the ItemNames property whenever you need to change the contents of the listbox?

-D

Message 3 of 7
(4,012 Views)

Good Thought.

I had considered that, but the problem is that data is only transmitted once every ten seconds.

When the user switches to a different set of devices, they might have to wait ten seconds for a display.

While that is not necessarily a deal-breaker, it is certainly not optimal.

 

Of course, now saying that, I could have a three dimensional array  of strings, and hide them.

Keep all data there and copy it from that array to the multicolumn listbox (there's got to be a shorter name) when the user selects a different set of devices.

 

Thanks for making me re-evaluate.

Although, I still would like to know how to make an array of mclistboxes work.

 

 

 

0 Kudos
Message 4 of 7
(4,001 Views)

So I don't understand how the 10 second data delay affects one UI implementation over the other.  I assume you would be caching the data so that the UI updates immediately with the proper settings.  I guess I don't have a full understanding of how your application works exactly.  But I'm guessing there is an elegant way to solve this using only one listbox.  🙂

If you want to post a simple example demonstrating how your application works (maybe using simulated data instead of the actual hardware reads), I can take a look and see if anything comes to mind regarding simplification of the UI.

-D

0 Kudos
Message 5 of 7
(3,996 Views)

That's what I was saying.

I will use a 3D array to hold the data as it is received (up to 320 devices) every ten seconds.

When the user selects which of the device groups that they want (20 groups of 16) I can transfer that data from the 3D array to the listbox.

 

That is exactly how I am going to do it.

 

Now it is just a matter of curiousity as to why I cannot have an array of listboxes.

Thanks

 

0 Kudos
Message 6 of 7
(3,986 Views)

Remember, the definition of an array is that it is a group of objects that are *exactly* the same other than their value.  Since the value of a listbox is the selected row(s), you can't have an array of listboxes of different cell contents, since the cell contents of a listbox are a property of the listbox, and have nothing to do with its value.

To accomplish what you're talking about in the UI, you should consider having an array of clusters of tables.  It would be more difficult to accomplish the row selection aspect, but this way, you could have an array that displays a 2D array of strings (as a table instead of a listbox), and each array element could be different (since the array elements are clusters containing a table).

In case you're wondering, you can't make an array of tables because a table is a 2D array, and you can't have an array of arrays in LabVIEW.  But you can have an array of clusters of arrays.

Probably way more information than you wanted.  But maybe it won't be for the person who searches the forums a year from now wondering how to get an array of tables on their front panel.  🙂

-D

Message 7 of 7
(3,975 Views)