02-28-2006 02:10 PM
02-28-2006 05:30 PM - edited 02-28-2006 05:30 PM
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
03-01-2006 12:46 AM
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
03-01-2006 08:03 AM
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.
03-01-2006 10:34 AM
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
03-01-2006 01:10 PM
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
03-01-2006 02:27 PM
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