05-08-2015 12:05 PM
Hi, All
I have a vi proecess key down events for panel and a numerical control in this panel. the application will do:
1. when panel is focused, user can use "up" and "down" key to driver some hardware.
2. when the numerical control has the focus, "up" and "down" key will change it's value as usual.
somehow the second one did not work, because the panel "key down" event was trigger as well when I use "up' "down" key inise the numerical control.
then I used "Key down?" of numerical control to block the "up/down" key. But the first time when I run the Vi, the panel still got triggered one time.
any suggestions on this? test code attached in this post too.
thanks
Solved! Go to Solution.
05-08-2015 12:29 PM
Use the application key-down event and combine it with the key-focus-property of the others to decide which function should be used.
/Y
05-18-2015 12:33 PM
you mean the VI keydown event? I registered it as dynamic event in my code. but still did not make it work. any simple example?
thanks
05-18-2015 01:28 PM - edited 05-18-2015 01:29 PM
This works for me in 2014. In short, you just need to check to see if your numeric has the focus. If it doesn't, then you process the key value. No need for any other event here except for the stop button.