08-23-2021 12:03 PM
Здравствуйте, можете подсказать как сделать чтобы в элементе 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.
08-23-2021 12:33 PM
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.
08-26-2021 11:37 AM
Хорошо, спасибо...А как вставить символ новой строки в переменную?
Well, thank you...And how to insert a newline character into a variable?
08-26-2021 03:23 PM
As I told you, newline character is '\n', for example
strcpy (msg, "This is a\ntwo-line text");