LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Listbox Value change not registering

Solved!
Go to solution

I am trying to allow the list box to select\deselect multiple values without holding the control key (touch screen user) 

I found this forum: https://forums.ni.com/t5/LabVIEW/multiple-selection-in-listbox-without-using-ctrl-key/td-p/877595?pr...

 

but the problem is that if trying to deselect all values, the last value does not register as a value change event. I am unable to have zero values selected, even though I have the selection mode of the list box set to zero or more items. Why does this happen? I figured if the list box is set to 0 or more items, then unselecting the last item so that there are zero items would register and event value change?

 

Any help with allowing the list box to have all values unselected without having to hold the control key would be greatly appreciated.

0 Kudos
Message 1 of 3
(1,200 Views)

Turn it into an indicator (or disabled control, but that requires local variable to write back).

 

Now just use mouse-down events and toggle the moused cell. Here's a quick example.

 

 

altenbach_0-1593383045369.png

 

0 Kudos
Message 2 of 3
(1,177 Views)
Solution
Accepted by topic author arob

Note that there is also a "point to row" method that translates mouse coordinates to listbox rows. Useful because it can do bounds checking, ignoring clicks on e.g. the scrollbar.

 

altenbach_0-1593383527767.png

 

 

 

 

Message 3 of 3
(1,172 Views)