LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading from a cell of a Multi column listbox

Hi Gang
 
I have never used a multi column listbox and don't now exactly how to use it and wondered if I could get a little info on it I want to write a table which visually looks like a table but also does some stuff in the program, therefore I would like to know how to access individual cells in a multilist box and generally play around with it. It looks like it only gives out a single int, but I am not sure how that can be useful:?
 
My example is I have a multi serial inputs which I want to specify and either enable or disable e.g
 
COMS                          DESCRIPTION                           ENABLED
COM1                           This is a thingy A                        Y                         
COM2                           This is a thingy B                        Y
COM3                           This is a thingy C                        N
COM4                           This is a thingy D                        Y
COM5                           This is a thingy E                        N
COM6                           This is a thingy F                        Y
 
In the program I go through this list going through each row saying is this enabled use this com port and add this information to it. What I am unsure about is how you access each cell and retreive the value out of it.
 
I know I could use an array or a cluster (including boolean enables) but just wondered if it could be done with this listbox
 
Nice
0 Kudos
Message 1 of 4
(4,509 Views)
You could the 'item names' property node of list box , which give a 2D array of strings and index out required cells using 'index array' function
You could probably use 'edit position' property node to select a cell on the multi column list box ( double click on a cell and you get its row and column number in edit position property node)

Message Edited by devchander on 03-07-2007 06:30 AM

0 Kudos
Message 2 of 4
(4,505 Views)

The output of a listbox depends on which selection mode it's in.  If you set the mode to 1 row only then you get an I32 out, if you set it to 1 or more rows you get an array of I32s out.  You can select more than one row at a time by using the standard shift and cntl clicks on the listbox.

As far as retrieving column selection info, I don't think it's possible with the listbox in LV7.1 (maybe in ver 8+?).  The table control however allows you to determine row, column and even selected range through the use of property nodes.  Unfortunately, since it is designed for inputting text (the cursor is a text input marker rather than the pointing finger) it doesn't really make an intuitive selector control. 

BTW, there is a really informative example called "listbox for file explorer demo".  It doesn't incorporate any column selected options though.Smiley Sad

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 3 of 4
(4,496 Views)

I was just working with this and discovered that the listbox must be a control and not an indicator. Then the values array indicates the row.

0 Kudos
Message 4 of 4
(3,602 Views)