LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Updating control values without mouse clicking elsewhere on screen

I have an application where I want to update the values in text and numeric controls without clicking elsewhere on the screen to the accept values. I haven't run accross this issue in the past because I have always had a stop button, which acts to accept the values. But with this application, I am using an Event Structure to monitor the front panel close (red X) to close the VI. I was thinking I could add another event to monitor if the mouse moves, if so then I could use a property node to accept values in the text and numeric controls. But what property node? Any other ideas?
Doug Ferguson

www.southerndaqsolutions.com
Message 1 of 16
(3,803 Views)
use the event for the specific control---> value change.  It will tell you when the user clicks out of the control. If you want to know AS they are changing it, then you can set the control to synchronous display from the context advanced menu.

Paul
0 Kudos
Message 2 of 16
(3,800 Views)

Doug,

If I understand your request correctly, I would be bracing myself for some negative feedback. The mouse sitting over a control I am trying to edit can be quite anoying because it obscures the view of what you are trying to enter.

Have you concidered using the "enter" or "return" keys?

Just trying to help!

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 16
(3,797 Views)
If the user clicks out of the control, then the value is accepted and I don't need to do anything. In my case a user may make a change in a text control and while the cursor is still in the text control, they will close the window to exit the VI (which writes this information to a config file). When this happens the value in the text control where the cursor was left wasn't accept and not written to the config file. I'd like a way to make a mouse move the same as clicking elsewhere on the panel.
Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 4 of 16
(3,797 Views)
I know to hit the enter key or to click elsewhere to accept the value, but the end user may not. The client has asked to use the Windows red X (close panel) to exit programs and not a "EXIT" button on the front panel. I'd like to find a simple solution that won't force me to put in a EXIT button or an ACCEPT VALUES button.
Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 5 of 16
(3,793 Views)
"... a simple solution ..."
 
hmmmm
 
Enable type ahead on all controls.
 
Use FP close event to check if one of the controls in question has key focus. If so, procees as required.
 
Simple?
 
You tell me!
 Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 16
(3,781 Views)
I found buried in the properties for the controls, the update while typing property. Will this negatively affect the preformance of the VI in anyway? It seems to do what I need, but could it have negative affects like synchronous display?????
Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 7 of 16
(3,782 Views)
"update while typing "
 
Yes that is what I intended to say rather than "type ahead".
 
You know you have been coding too long when you use DOS options when talking about LV. Smiley Mad
 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 16
(3,775 Views)

Update while typing only works for string controls. I've wanted a way to do that with numerics in the past but couldn't get it to work without unsetting and resetting keyboard focus. The 'synchronous display' option does not do this. Enabling this updates the display every time the control changes instead of dropping some of the updates.

For your situation, I would use a "Panel Close?" filter event and change the keyboard focus in this event before saving the values to file. This way the cursor will move and whatever control it was in as the user closed the panel will be updated before you save the value.

0 Kudos
Message 9 of 16
(3,770 Views)
Is the key focus a property for each numeric control or a VI, Application, etc. property? I have about 30 numeric controls and I'd like to avoid dropping a property for each if I can.
Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 10 of 16
(3,765 Views)