04-13-2012 03:26 AM
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?
04-13-2012 03:39 AM
04-13-2012 03:53 AM
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
04-13-2012 05:53 AM - edited 04-13-2012 05:54 AM
.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.
04-13-2012 06:05 AM
Ohh.... Sorry for wrong suggestion.
Mousedown event on Front panel would work.
04-13-2012 06:10 AM
And if someone accidentally mousedown on the frontpanel in the middle of execution? Then it fires an event unwanted.
04-13-2012 06:18 AM
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..