01-27-2020 10:20 AM
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.
Solved! Go to Solution.
01-27-2020 10:55 AM
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.
01-27-2020 11:00 AM
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.
01-27-2020 11:30 AM
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
01-27-2020 11:31 AM - edited 01-27-2020 11:32 AM
Edit: Kevin beat me to it!
How about this checkbox?
01-27-2020 11:35 AM
Thanks Kevin, that did it. I checked my Options menu but somehow didn't see it. Maybe I need more coffee 🙂
01-27-2020 12:25 PM
Or if you want to edit the executable behavior, you put this in your application's ini file:
returnKeyAction=True