LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to output number of selected row and change other row formats in a listbox?

I want to do two things in a listbox. Basicly, I have at present a drop down box and a listbox. The drop down box contains 19 values from +90 to -90 in steps of 10. The listbox displays these 19 numbers. If for example +90 is selected in the dropdown box and a button is pressed, it is removed from the listbox. The listboxis there simply to indicate to the client what values are still to be selected. This works fine, but I was thinking that it would work much better if the client could select the values from the listbox, and when they log the data the format of the font in the listbox would change, say for example to put the text in strikeout. I can't find any of the properties that would seem to allow this to be done however. What I need is a property that will output the number of the selected (highlighted) cell

Therefore, the program would run as follows, if for example +90 (first in the list) is selected, and I press the store button, I will get an output of zero to select what cell to write the data to the array. The format of the +90 will then change to strikeout or something similer.

I have attached the present vi (8.5 format)

0 Kudos
Message 1 of 4
(2,752 Views)

Hai,

 

Look into assinging symbols to each item in Listbox.  Instead of formatting the text applying symbols will be much easier.

 

Have a look into example vi's to display symbols.

 

With regards,

JK

With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
Message 2 of 4
(2,733 Views)
You will also need to change the listbox to return an array instead of a scalar, so you can get all the selected item. Right-click and select Selection Mode -> 0/1 or More Items, where 0/1 depends on whether you want to allow no selections, or at least one.
Message 3 of 4
(2,714 Views)
will try that and report back. Thanks guys
0 Kudos
Message 4 of 4
(2,704 Views)