LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to make a line of a multicolumn listbox active?

I currently have data entered into multicolumn listbox.  While the program is running, is it possible for a row of the listbox to be selected and then give the index number of that row?  From there I will want to use that index number to reference other arrays, but right now I'm just dealing with getting the index number I need from the user's row selection. 
0 Kudos
Message 1 of 10
(3,974 Views)
By default a multicolumn listbox returns the index number of the selected row from its terminal. If you wish to have the entire row highlighted, then right-click on the control and select Selection Mode -> Highlight Entire Row.
0 Kudos
Message 2 of 10
(3,969 Views)
To get the row index for use you need to get the value property.
Jim

LV 2020
0 Kudos
Message 3 of 10
(3,961 Views)
OK. Please explain to me why you are using a property node to get the value when you can just use the terminal, AND you're taking an I32 value and using TypeCast to ... convert it to an I32!?!? Smiley Surprised
0 Kudos
Message 4 of 10
(3,950 Views)
True, I could have placed the terminal in the event case.  I was assuming that he was going to be adding on to code and the terminal was already used elsewhere.  Either way if you place an indicator on the output you get a listbox indicator not the index of the selection.  I'd be happy to learn a better way.  The I32 is the default numeric constant, I didn't see the need to change it for this purpose.
Jim

LV 2020
0 Kudos
Message 5 of 10
(3,938 Views)

@lmtis wrote:
The I32 is the default numeric constant, I didn't see the need to change it for this purpose.

You missed my point. The output datatype of the Value property node is an I32. You are wiring to an I32 indicator, but shoving it through a TypeCast function. This is pointless.




Message Edited by smercurio_fc on 06-20-2008 12:12 PM
0 Kudos
Message 6 of 10
(3,930 Views)
What actually happened is that I was not thinking.  I kept right clicking on the terminal and creating an indicator rather than creating a numeric indicator and then wiring to it  Smiley Surprised  Head got stuck in a dark place! Smiley Mad
Jim

LV 2020
0 Kudos
Message 7 of 10
(3,923 Views)

Thanks a bunch for the help.  Smiley Happy

Once I try to use the index in the next part of my code, I will let you know if I need more help from there.

 

0 Kudos
Message 8 of 10
(3,919 Views)

@lmtis wrote:
What actually happened is that I was not thinking

I hear you. Wish I had a nickel for every time that happened to me. Bill Gates, here I come! Smiley Very Happy
0 Kudos
Message 9 of 10
(3,917 Views)
LOL!!
 
Glad I'm not the only one these things happen to LOL!! 😄
 
It's either related to information overload or old age..  😞
0 Kudos
Message 10 of 10
(3,909 Views)