LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

KeyFocus Change Event

I wanted to trap changes in key focus, but there's no built-in event for it.  I couldn't find anything online that someone had already built, so I invented my own.  It's a bit messy under the hood, but fairly clean at the top level.

Captured001.png

"If you weren't supposed to push it, it wouldn't be a button."
Download All
0 Kudos
Message 1 of 9
(3,554 Views)

My Christmas wishlist:

 

Labview 2016

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 9
(3,550 Views)

Nothing happened for me when I clicked either the Boolean button or the Stop button (the latter I understand ...).

 

I understand the logic of putting the code in a library (an .lvlib file).  But what is the reason/are the advantages of using a .llb to further "bundle" these routines?  [I partly answered my own question by using LabVIEW Help, including the Saving VIs section, but I'm still a bit unsure I completely "get it" ...]

 

Bob Schor

 

0 Kudos
Message 3 of 9
(3,530 Views)

Clicking on the Boolean doesn't give it  key focus.

I use .llbs as a convenient way to package a set of related VIs.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 4 of 9
(3,481 Views)

Here's an improved version.

"If you weren't supposed to push it, it wouldn't be a button."
Download All
0 Kudos
Message 5 of 9
(3,472 Views)

I guess you all kudoed this (mine) idea?

😄

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 9
(3,471 Views)

Wow, a 5-year-old, 130 (now 131) Kudo'ed Idea still hanging in there.  Go, GerdW!

 

Bob Schor

0 Kudos
Message 7 of 9
(3,453 Views)

On that old post, someone wanted the event data to include info about which control previously had focus.

This raises the question: The 'previous control' on the current VI, or the 'previous control' on any VI?

The first would be fairly easy to add.  The second, I haven't figured out a way to do that.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 8 of 9
(3,436 Views)

After many machinations, I came up with a version that works with multiple simultaneous VIs and also with multi-pane VIs.

"If you weren't supposed to push it, it wouldn't be a button."
Download All
Message 9 of 9
(3,408 Views)