LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Enter key to line break

Solved!
Go to solution

Hello everyone,

 

I hope someone can help me with this question. Is it possible to use the Enter key on the keyboard to move down a line in a string box?

 

My situation is the following, I have a VI with a 3-column listbox, I can add a new line, delete an existing one, and save this information in a txt file.

 

Mocte117_0-1749577012065.png

 

If I add a new row, a new window appears. The idea is for the user to enter a number, a project, and a description. The problem is that I need a line break to appear in the description for each new comment. And save this information to the text file in the previous window. Is this possible? (VI attached)

 

Mocte117_1-1749577304114.png

 

 

 

0 Kudos
Message 1 of 4
(330 Views)

Turn off limit to single line:

aeastet_0-1749580134822.png

 

Tim
GHSP
Message 2 of 4
(306 Views)

Thanks! But the problem persists when saving the file. Since it's a .txt file, the information isn't saved as shown in the string. When the file is saved, new lines are added, causing the file to appear differently when reopened. Is there a way to fix this?

0 Kudos
Message 3 of 4
(240 Views)
Solution
Accepted by topic author Mocte117

Hi Mocte,

 


@Mocte117 wrote:

Is there a way to fix this?


Sure:

  • Replace the linebreaks by a different char before saving to text file.
  • Use a different file format instead of plain text.

In the end it boils down to:

  • write down ALL the requirements you have
  • create a program to fulfill all those requirements…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(230 Views)