LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Prompt User for input - enter key approve

Hi team , 

 

i  using the " Prompt user for input " for getting the input from the operator .

The thing is I don't want the user have to press "OK" every time.

Even operator pressed " enter " key from keyboard  also should be accepted  . 

 

 

Note : I opened a front panel of Prompt user for input and looking to change .  What type property node should be used ? or some other alternative way to resolve this . 

 

suggest a methods 

 

Thanks in advance 

0 Kudos
Message 1 of 21
(5,653 Views)

I'm not a fan on the Prompt User For Input.  Make a VI to be your dialog.  It can be really simple.  You can also link the OK button to the enter key.


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 2 of 21
(5,647 Views)

Hi crossrulz , 

 

How will i Linking OK button to enter key ? property node ? or something else ?

 

 

0 Kudos
Message 3 of 21
(5,642 Views)

@willcan wrote:

How will i Linking OK button to enter key ? property node ? or something else ?


Right-click on the control and choose Properties.  There is a tab (may have to scroll all the way to the right) for Data Binding or something like that.  Use that dialog.


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 21
(5,635 Views)

Hi crossrulz , 

 

I tried of using Focus key binding which is property for navigating a shortcut .  

 

when i tried that error 1077 , invalid property error was popping out . 

 

Could you please tell me as vi or picture .how to using that property node and how to get a data from user and even user presses enter key it should accept and proceed . 

 

Help me regarding this. 

0 Kudos
Message 5 of 21
(5,596 Views)

Please explain what kind of inputs you have configured, because the workaround depends on it!

In the standard express VI you are using, <enter> cannot be used in general, because you might have multiple fields and enter will terminate the input for each. You would not want to terminate the dialog after just one has been modified. (Besides, that express VI dialog is extremely ugly. I would never allow that in my programs!)

 

How is your express VI configured and how many fields, and what types? You typically would get much more targeted help of you would make it a habit to attach a simple VI explaining the problem.

 

It is trivial to write your own dialog box that reacts to <enter> the way you want. If the input is a string, set to to "limit to single line" Use event structures for value change and terminate the dialog when a vale has changed.

0 Kudos
Message 6 of 21
(5,587 Views)

You don't need any property nodes to do what you're trying to do IMO. Without seeing your VI, here are the steps I think you should try:

 

1. Configure your Prompt user for input Express VI as much as you want, with the message to appear, the inputs and so on.

2. Right click the Express VI and Open Front Panel. You'll be asked to save this, as you are essentially creating a VI of your own with the configured ExVI as the starting point.

3. Go to the front panel and right click your OK1 button (I assume you've configured your VI to not show the cancel button, so this is the one you want to modify the behavior of). Click Properties, and go to Key Navigation all the way to the right. I've attached a picture of the default key navigation behavior of Prompt User for Input ExVI. OK2 and Cancel have default bindings already.

4. What you want to configure is the Toggle setting. That is where you can set a key combination that will immediately toggle the button and stop the VI.

5. Clean up the extra junk you don't need, mostly from OK2 and Cancel buttons not being needed if you don't need them and save the VI. You could add whatever UI enhancements you want as well, the one I'll mention is to only enable the OK button if all fields have something in them.

 

Redhawk92_0-1594396494414.png

 

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

Message 7 of 21
(5,572 Views)

Hi redhawk92, 

 

Its working . thanks for your suggestion . 

i am new to labview . I just used the return  as toggle and followed your screenshot 

 

Could you be explain me in detail about this toggle option .

Because in the toggle menu

" enter key " caption was not there . Other than that , ( escape , home , volume up and down and f1,f2 etc)  was there . How labview accepting enter key as "return" toggle?? 

 

what was the role of modifiers in that .? please provide any white paper link  or explain this  😊

0 Kudos
Message 8 of 21
(5,513 Views)

@willcan wrote:

 

Because in the toggle menu

" enter key " caption was not there . Other than that , ( escape , home , volume up and down and f1,f2 etc)  was there . How LabVIEW accepting enter key as "return" toggle?? 

 

what was the role of modifiers in that .? please provide any white paper link  or explain this  😊


"Enter" and "Return" are two different names for the same key  !!

0 Kudos
Message 9 of 21
(5,493 Views)

What you normally think of as the Enter button is actually called Return in LabVIEW and I'm sure in a lot of other places too. The Enter key next to your number pad is the one called Enter. You can see this for yourself with an event structure, a key down event, and an indicator on VKey.

 

They are definitely not the same key, although in most cases they function the same. The main difference in behavior in my experience is that with labels and comments, Return moves you down a line and Enter actually "completes" the text. For some (good, I'm sure) reason, they don't offer both of those as options to toggle, instead just offering Return and having both keys respond to that.

 

Modifiers just make it to where the user has to click Shift+F4 or CTRL+F5 or CTRL+Shift+F6 etc., for the toggle to happen.

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 10 of 21
(5,459 Views)