LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

KeyFocus after clicking away Front panel...

I have an application that requires KeyFocus on a TextField.

 

At runtime, when I click away from the front panel and then click back to the front panel, the KeyFocus don't come automatically back to that textfield.

 

How can I set the KeyFocus back after clicking back?

0 Kudos
Message 1 of 7
(3,299 Views)

Hi Jo,

 

there's a property KeyFocus. You should use that for your text input...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(3,296 Views)

Hi JO,

 

As GerdW said yo can use property node "keyfocus"

If you click anywhere else than frontpanel, your window is not active, and when you click back on front panel, it will be active and frontmost.

 

So you can use "IsFrontmost" property or Event to again call "Keyfocus" Property

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 3 of 7
(3,293 Views)

.IsFrontMost refers to the vi that is most front. If I click to my explorer in windows the vi still is most in front. Because it is the only frontpanel showing.

0 Kudos
Message 4 of 7
(3,281 Views)

Ohh.... Sorry for wrong suggestion.Smiley Sad

Mousedown event on Front panel would work. Smiley Happy

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 5 of 7
(3,276 Views)

And if someone accidentally mousedown on the frontpanel in the middle of execution? Then it fires an event unwanted.

0 Kudos
Message 6 of 7
(3,272 Views)

You can have additional interlock, whether you want it first time or when your code is at particular execution state.

 

We don't know when you want Focus on text indicator. We can just suggest methods, you will have to figure out how to add additional interlocks..

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 7 of 7
(3,269 Views)