LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Listboxes

i have to write a program that does some calculations for a high voltage test thingy yadda yadda... stuff which is irrelevant to my question... that is, how do i output my data in a listbox to make it look nice and pretty? what i need to do is perform certain operations on data and then output the results in a listbox and then i need to output next to them the percent deviation from expected etc etc... i'm having trouble figuring out how to use listboxes... basically, i don't know how to output my data from an array into a listbox where it looks much better... anyone got any ideas? thanx...

christina
ps. working version of file is attached just for reference...
0 Kudos
Message 1 of 8
(2,863 Views)
Hi christina,

If it's just for display purposes, you might want to use a "table" instead. A table is a 2D array of strings. You can also specify column headers and row headers for a table.

hope this helps,
Dan
Message 2 of 8
(2,863 Views)
Format your output as a 2D array of strings, then feed it to a property node of the listbox (select property "ItemNames"). Transpose the array as required.
Message 3 of 8
(2,863 Views)
Thank you for your help... unfortunately i don't see "item names" under properties... did you mean something else?
0 Kudos
Message 4 of 8
(2,863 Views)
i'm sorry, i found it... thank you
0 Kudos
Message 5 of 8
(2,863 Views)
so how would one do that? Thank you!
0 Kudos
Message 6 of 8
(2,863 Views)
Hi,

You can create a table from the VI front panel (it's in the same palette as listbox), right click on the table, look at "visible items", and then specify things you like to have in your table, such as column headers, row headers, or scroll bars.

To specify the headers, you can enter the them manually from the front panel, or you can also input them dynamically in your program. Use table's property node and select "column headers[]" to write column headers.

As to how to write to a table, just format your output as a 2D array of strings and wire it to a table indicator.

Dan
0 Kudos
Message 7 of 8
(2,863 Views)
thank you that helped!
0 Kudos
Message 8 of 8
(2,863 Views)