Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 68979

Key focus behavior of controls

$
0
0

Hello,

 

I came across a point with key focus behavior and interferences with key navigation. To understand the point I´m going to describe the actual behavior and the expected and documented behavior.

 

Expected behavior


Some controls like Boolean button, strings or numeric supports return/enter based key focus behavior. A Boolean button toggles the value, a string makes a new line (return) or enters the input (enter) and a numeric enters the input. Now we are also able to define key navigation which allows to toggle a Boolean button with the Return button of the keyboard. What would we expect in this place? I would expect that if key focus is NOT active the key navigation is activated and if key focus IS active the key focus behavior has priority. The Knowledge Base Article points to that expectation ("If any control uses the <RETURN> key navigation, pressing this key will only activate that control if no other control has key focus. The key focus behavior has priority over the key navigation.").

 

Actual behavior

 

The above expectation is true for Boolean buttons. This means if I have active key navigation with Return to a button and I set key focus to another button and press Return I toggle the button with key focus and not the button with the configured key navigation. This is expected and fine so far but does not work with numerics or strings. If I try it on such controls the key focus behavior is not activated if I press Return but only the key navigation behavior is activated. I find this behavior really weird because the knowledge base article states otherwise and also other software doesn´t behave like this (Try it for example with windows dialogs...).

 

 

To test it you only have to place some controls on a blank VI and change to run mode. I tested it with LabVIEW 2012 SP1f3.

 

Do I miss a point here or is this some kind of bug?

 


Viewing all articles
Browse latest Browse all 68979

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>