LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Enter" key on string control: dev environment is different from executable

Solved!
Go to solution

I have a multi-line string control for entering a list of "stuff". When running the VI in the development environment (actually running it, not in edit mode), pressing Enter will halt text entry. To get a new line, you have to press Ctrl+Enter.

 

When this exact same VI is built as an executable, Enter will add a newline- not halt entry.

 

The control isn't set to Limit to Single Line.

 

Is there a way to make the two execution modes the same? I don't like surprises that only show up in a built executable.

0 Kudos
Message 1 of 7
(2,903 Views)

Hi Bert, is there any chance you are using 2 different keyboards when testing? For keyboards with 2 enter keys, the one above right-shift can act as a return key, giving a line feed. While the one at the bottom right of the numeric pad is used to confirm and end editing mode.

0 Kudos
Message 2 of 7
(2,882 Views)

Nope, same everything. I'm sitting here in the dev environment, using/debugging/modifying the code, and when I build it then run it (right click the build spec -> Run), the Enter key behavior changes.

 

It's not a huge deal but it would be nice to know. I would have guessed it's a setting in my editor environment somewhere, but I can't find it.

0 Kudos
Message 3 of 7
(2,871 Views)
Solution
Accepted by topic author BertMcMahan

The only item I'm aware of is under Tools-->Options-->Environment.  There's a checkbox available for "End text entry with Enter key".   I just now checked the LabVIEW.ini file.  Checking that box seems to map to a boolean key "returnKeyAction=True".  Unchecking the box seems to remove the key.  I don't honestly know whether manually setting that key in the .ini for your executable would let you choose the executable's behavior.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 4 of 7
(2,842 Views)
Solution
Accepted by topic author BertMcMahan

Edit: Kevin beat me to it!

How about this checkbox?

 

Capture.PNG

Message 5 of 7
(2,839 Views)

Thanks Kevin, that did it. I checked my Options menu but somehow didn't see it. Maybe I need more coffee 🙂

0 Kudos
Message 6 of 7
(2,833 Views)

Or if you want to edit the executable behavior, you put this in your application's ini file:

returnKeyAction=True

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
Message 7 of 7
(2,799 Views)