06-18-2007 12:40 PM
06-18-2007 12:53 PM
Its not working.
I have set the key focus to an arbitrary button when the front panel closes, yet it doesn't seem to accept the value in the numeric control.
06-18-2007 01:01 PM
Can you post the VI?
Make sure you are using the error out of the key focus property node to ensure that it executes before you move on to saving the data. If you just put the node beside your other code in the panel close event, you can't be sure in what order it will execute.
06-18-2007 01:07 PM
06-18-2007 01:08 PM - edited 06-18-2007 01:08 PM
I just started playing around with this and it works fine for me without doing anything special with the key focus. I simply used the "Panel Close?" event, and wrote a numeric to file in it. When I close the window with the cursor is still in the numeric field after typing a number, it gets saved to the file as expected. What version of LabVIEW are you using that this doesn't work for you?
Edit: Posted at the same time, glad you figured it out.
Message Edited by Marc A on 06-18-2007 02:08 PM
01-05-2023 07:40 AM
Try the following:
1. Create a reference for each control.
2. Bundle the references into an array.
3. Whenever you move your mouse into a control where all others should have been read already, you can set the key focus to FALSE to all controls with a for loop.
4. You can put this in a subVI that accepts the reference array as an input.