LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
GerdW

Key focus Event

Status: New

Hi,

 

i propose to add a "Key Focus" event for each control. We already have Mouse events (leaving, entering) - but when the user (or the programmer) prefers the keyboard (with proper tabbing setup) you have to poll each interesting control for it's "Key Focus" property to initiate a user event...

 

So please:

Add a "Got Focus" (and additionally a "Lost Focus") event to the event structure!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
24 Comments
AristosQueue (NI)
NI Employee (retired)

If we do this, please make sure that the data portion of "Got Focus" includes information about what control had it previously so that you can tell whether the user hit TAB or shift+TAB in case you're trying to forward the focus along (say a cluster forwarding to its contents).

SteveChandler
Trusted Enthusiast

There are lots of events that should be added. Events in LabVIEW are pretty limited compared to something like Windows Forms.

 

Some others: Ring or enum dropdown or collapse (before and after), panel loaded, panel visible, minimized, tree node before expand, after expand... I am sure I could come up with more.

=====================
LabVIEW 2012


silmaril
Member

Yes! The got/lost focus events are definitively the ones I am missing most!

 

Not having them leads to very unelegant code, in which I have to check the KeyFocus property of a large list of controls every few milliseconds.

 

Maybe we could also have an event "Panel:Focus Change"?

This would be triggered whenever any focus change on a panel occures (and of course it should contain control references to the controls that just lost and got the focus).

 

JackDunaway
Trusted Enthusiast

>> "...check the KeyFocus property of a large list of controls every few milliseconds."

 

The LabVIEW substitute for Prime95. Smiley Very Happy

 

Having a "Panel: Focus Change" with new/old refs is a great idea! +1

josborne
Active Participant

I just tried to add a "GotFocus" event to my VI.  Realized it didn't exist.  So ended up here like everyone else.  Argh!  

 

upvote!

http://www.medicollector.com
WG-
Member
Member

This should definitly be implemented in LV 2013.

Intaris
Proven Zealot

And it would be cool if this and almost all other events were bidirectional allowing fcar more custom UI functionality.

Romain_Duval
Active Participant

Definitely +1 for the panel:focus changed event.

Romain DUVAL || RF & Semiconductor Staff System Engineer || CLA || CTA
National Instruments France

Romain_Duval
Active Participant

I might have found a way to do it partially. see my post on this forum

 

regards

Romain DUVAL || RF & Semiconductor Staff System Engineer || CLA || CTA
National Instruments France

SL13
Member

hi,

yes a focus event would be very convenient. +1 for this idea