Question
KPMG
PT
Last activity: 26 Jul 2017 14:07 EDT
RichTextBox and Text Area - New Line
Hello,
I need to add multiline text to these controls (RichTextBox - Windows Forms) and (TextArea - HTML).
Does anyone Know how to do this?
I have tried using \n together with the text I need, for instance "Line 1 \n Line 2 \n Line 3" and it simply does not work. It pus everything on the same line.
Thank you very much for your help.
Regards,
Lara
-
Likes (2)
BHARGAV PUTUMBAKA Ajay Rajendran -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
US
Pass three variables - Variable 1 contains String_1, Variable 2 contains an "Enter Key", Variable 3 contains String_2.
Pegasystems Inc.
US
Use AppendText and pass in a "enter" key as the parameter. By that, I just mean .. click into the parameter and hit enter.
-
Supuni Nimeshika
KPMG
PT
That worked, thank you.
But I need to do this with a variable so I still have the issue... how do I pass new lines to the variable?
Thank You!
-
Shrividya K
Pegasystems Inc.
US
It works the same in the String variable. Have you tried it already and it didn't work? Can you show me an example of the use-case?
KPMG
PT
I have two string variables and I need to put one in the first line and another in the second line. This is my problem... how can I do this?
Accepted Solution
Pegasystems Inc.
US
Pass three variables - Variable 1 contains String_1, Variable 2 contains an "Enter Key", Variable 3 contains String_2.
KPMG
PT
Thank you for your help, this is working now.
Regards,
Lara
Pegasystems Inc.
US
You can use a StringUtils component and call the Concat method. From there you can either type in the strings you want, or pass them as arguments. Typing (i.e. clicking in the method parameter and hitting enter) the "enter" key will produce a newline.