LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unexpected listbox navigation behavior

I found an unexpected behavior when navigating a listbox using the arrow keys. Items whose symbols are divider lines, and are thus not selectable, are included in the arrow navigation, but without visual feedback.

 

This is in contrast to other non-selectable items in the listbox, which are not skipped in keyboard navigation, but are highlighted (differently, with a gray outline) than selected items, so that there is visual feedback.

 

The preferred behavior for divider lines would be to skip dividers in keyboard navigation.

 

Thoughts?

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 1 of 7
(521 Views)

Does this apply to all styles of listbox?  Modern, NXG, Silver, Classic, System?

0 Kudos
Message 2 of 7
(486 Views)

It is easy to show that this is the behavior across all types, as shown in the attached VI. Notice it also occurs on multi-column listboxes. In all cases, if you start on item a, the first click activates the divider row without feedback, and the second click shows you on item c. Hard to believe this behavior has existed in LabVIEW for so long.

 

Is there an instance where keyboard navigation to a divider line would make sense?  It does appear that the symbol and value of the divider-line item is not available for programmatic processing, as shown in the example.

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 3 of 7
(415 Views)

I have requested this to be fixed in the Idea Exchange. Go vote for it!

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 4 of 7
(179 Views)

Maybe you should save the example in an older LV version so more people can examine it?

I don't think I have ever used a list box before in my 25+ years of programming in LV 🤔

---------------------------------------------
Former Certified LabVIEW Developer (CLD)
0 Kudos
Message 5 of 7
(163 Views)

I was too curious about this behavior, so I looked up the LV example (C:\Program Files (x86)\National Instruments\LabVIEW 2020\examples\Controls and Indicators\Listbox\Listbox.vi) and inserted a separator. When using the arrow keys, the separator appears to "eat" the arrow-key press IE the separator does not get highlight as report in the OP. This was during dev mode. I did not explore if it behaved the same during run-time.

---------------------------------------------
Former Certified LabVIEW Developer (CLD)
0 Kudos
Message 6 of 7
(158 Views)

It does the same at runtime, and as you have found, it is an easy thing to demonstrate.

 

There's another weird issue, which is that if you arrow down to a disabled listbox item, it will be hi-lighted (with a gray box I believe), but if you set the value programmatically it will not get hi-lighted, so there's no visual feedback about the selection.

 

I use listboxes a lot, such as in the BundleMagic plugin, which makes extensive use of them in cluster element, method, property, and class selection dialogs. I'm also writing an application now that uses listboxes to allow selection/display of test modes for the device under test.

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 7 of 7
(151 Views)