LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Переход на новую строку Switching to a new line

Здравствуйте, можете подсказать как сделать чтобы в элементе string uir панели был символ перехода на новую строку...Например, при помощи GetCtrlVal при запуске программы я ввожу текстовую последовательность...мне нужно учесть символ перехода новой строки. Заранее спасибо.

 

Hello, can you tell me how to make the uir panel's string element have a newline transition symbol...For example, using GetCtrlVal, when I start the program, I enter a text sequence...I need to take into account the newline transition character. Thank you in advance.

0 Kudos
Message 1 of 4
(1,762 Views)

Hello, the string control is a single-line control; to have a multiline control you need to use a text box control.
In that one you can issue a new line by pressing Ctrl-Enter or a simple Enter key if you have checked the Enter Key Causes Newline checkbox in Text Box Options dialog.

To add a newline programmatically you must embed a '\n' character into the variable passed to the control.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 4
(1,755 Views)

Хорошо, спасибо...А как вставить символ новой строки в переменную?

 

Well, thank you...And how to insert a newline character into a variable?

0 Kudos
Message 3 of 4
(1,715 Views)

As I told you, newline character is '\n', for example

strcpy (msg, "This is a\ntwo-line text");



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 4
(1,712 Views)