From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Focus change when loading vi into subpanel

I've got a project which runs a vi in a subpanel. There's some automation which causes the vi to load and unload from the subpanel and i want for the user to be able to continue doing whatever he's doing while this happens. Unfortunately, every time the subvi loads into the subpanel, the focus changes.

 

To reproduce: open the project and run MAIN.vi. run and click the "Loop Enable" button. Then try to edit the "Milliseconds to wait" control. You'll see that the focus shifts away from the control. Is there a way to do this while keeping focus on the control (hopefully without getting reference to the control, letting the subpanel wrench it away, and then shifting focus back to the control. I want to avoid this because it'll change the cursor position)?

0 Kudos
Message 1 of 6
(3,335 Views)
How often does this loading take place? Could you defer the change in the subpanel as long as a control that you can type into has focus?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 6
(3,315 Views)
About as often as in the example. Plus there are lots of other controls in the actual application and the user may be changing many in the same timeframe. It wouldn't be acceptable to defer the subpanel loading as it is intended to be an indicator of background activity.
0 Kudos
Message 3 of 6
(3,304 Views)
Is that subpanel itself enabled or disabled? You might try disabling it. Or perhaps move the subpanel (or the controls) into a separate floating window.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 6
(3,286 Views)

It behaves the same way regardless of whether the subpanel is enabled or disabled.

0 Kudos
Message 5 of 6
(3,262 Views)

I also tried disabling every control on the subvi that loads into the subpanel but that didn't change anything.

 

I ended up using an animation sequence in a picture control inside a parallel loop in the main vi. The block diagram's a little busier now but at least the key focus remains unchanged.

 

Thanks for trying to help!

0 Kudos
Message 6 of 6
(3,235 Views)