LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you programatically highlight a line in a multicolumn listbox?

I am am trying to use a multicolumn listbox to keep track of an automated test process. As the test progresses (each row in the listbox defines a set of test parameters). I want the current test (ie line in the listbox) to be automatically high lighted and the previous test to revert to normal colours as the test sequence progresses. Any hints please?
0 Kudos
Message 1 of 6
(4,370 Views)
The only thing you need is to use property node, created from the right-click on the control, and select value property. Number of the current line will highlight the row with that number.
Sergey
Message 2 of 6
(4,370 Views)
Thanks for the quick reply Sergey. I can't however find any properties that control the current line. I'm using 6i.

Regards,

Niel.
0 Kudos
Message 3 of 6
(4,370 Views)
OK Niel,

Trying again. You have multicolumn list box control filled with lines of configuration data.

If you selected(one click) one of the lines, this line highlighted. Your control terminal shows some number. This number will show current active line. No property node needed for it, just I32 wire.

Then, if you want to highlight any other line of the control programmatically, just create property node, select VALUE property, make it as Write and wire desired number to VALUE property. This is enough.
BTW, if it's not working wire selection color property as well. Don't ask me why.

If it's not so, it means that I don't understand a question. Post a vi itself for exact explanation of what are you asking about.

My sample attached.
Regards.
Sergey
Message 4 of 6
(4,370 Views)
Thanks Sergey, got it this time. Your attachment does exactly what I want. Not sure what was wrong before, but I couldn't wire an I32 control to the value property. When I started from scratch and copied your example it worked fine.

Thanks again, Niel.
0 Kudos
Message 6 of 6
(4,370 Views)
Create a local variable for the control. When you write to it, it will highlight
that line on the listbox.
Message 5 of 6
(4,370 Views)