LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Update values in loop after pressing OK without leaving control

Solved!
Go to solution

Hello,

in a loop a string-control can be changed until the ok-button is clicked. This works.

But the button is also assigned to toggle with the Return-key.

But now the output is not updated any more.

Is there a workaround?

 

Thx

toggle.jpg

0 Kudos
Message 1 of 15
(3,269 Views)

On my machine there is the same behaviour with or without the toggle.

0 Kudos
Message 2 of 15
(3,260 Views)

Attached my VI that is not working here.

If i stop the loop with key Return then the text s not written

0 Kudos
Message 3 of 15
(3,252 Views)

Well, you are telling the loop to stop.  So you just want the output to update when you press the OK button?  But then you also want to keep the VI running?  So how are you then stopping your VI?

 

Use an Event Structure.  It will make your life easier (and not burn up your CPU).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 15
(3,250 Views)

I can't tell what your goal is with this fast-running loop.  If you're waiting for a change to the string you should use an Event structure.  If you want to process every change to the String control you can set it to Update Value while Typing.  If you just want to restore the edit position in the string after you're done editing it, use a KeyFocus roperty node.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 5 of 15
(3,249 Views)

Are you running highlight mode?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 15
(3,246 Views)
Solution
Accepted by topic author OnlyOne

@OnlyOne wrote:

Attached my VI that is not working here.

If i stop the loop with key Return then the text s not written


Set the control to Update Value while Typing.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 7 of 15
(3,245 Views)

Solution is only working with strings.

What can i do with numeric-controls? There is no setting "Update while typing"?

Thx

0 Kudos
Message 8 of 15
(3,229 Views)

Use an event structure.....

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 9 of 15
(3,225 Views)

I did. But it is the same problem. If the focus is on the control then the value is not updating.

It is solved for striing-control but still not working for numerics.

Same problem in the loop or event-structure.

 

0 Kudos
Message 10 of 15
(3,221 Views)