Hi,
we are desperately trying to insert line breaks into text fields.
While \\n, for example is working for primitive text, it isn't for text fields. I was wondering if someone in the community has more experience with that?
Thank you very much in advance for all support provided!
Line breaks in text field objects
- fmulder
- Posts:330
- Joined: Wed Feb 03, 2010 9:46 am
Re: Line breaks in text field objects
try \\r\\n (or \\n\\r)
share the fun
Frenk Mulder
share the fun
Frenk Mulder
- joost.lijster@siemens.com
- Posts:19
- Joined: Wed Sep 21, 2016 1:51 pm
Re: Line breaks in text field objects
Or, in case of rich formatting, use html ( )
- RudiKreiner
- Posts:198
- Joined: Mon May 16, 2011 2:10 pm
Re: Line breaks in text field objects
. . . and in tool tip text you can use html formatting like in this example:
this.toolTipText = "" + dpGetDescription(dp_name) + "";
this.toolTipText = "" + dpGetDescription(dp_name) + "";
- schneebergera
- Posts:89
- Joined: Sun Apr 03, 2016 5:52 pm
Re: Line breaks in text field objects
Hello,
please use different text field.
--> "Multiline text"
e.g.
main()
{
this.text("first row\\r\\nsecond row!");
}
best regards,
Andreas
please use different text field.
--> "Multiline text"
e.g.
main()
{
this.text("first row\\r\\nsecond row!");
}
best regards,
Andreas
- fmulder
- Posts:330
- Joined: Wed Feb 03, 2010 9:46 am
Re: Line breaks in text field objects
I'd prefer the following syntax:
or
Good luck with your multiline
Share + \\r\\n
The + \\r\\n
fun
Frenk Mulder
Code: Select all
void main()
{
this.text =
"First line\\r\\n" // Note how you can put a string on multiple lines !
"Second row\\r\\n"
"Third row";
}Code: Select all
void main()
{
string strLinefeed = "\\r\\n";
this.text =
"First line" + strLinefeed
"Second row" + strLinefeed
"Third row";
}Good luck with your multiline
Share + \\r\\n
The + \\r\\n
fun
Frenk Mulder
- afetzer
- Posts:4
- Joined: Mon Jul 30, 2012 10:46 am
Re: Line breaks in text field objects
Many thanks for the input to everybody.
The main issue for us, thanks to your feedback, turned out to be that a text field element is not the right one for multi-line text, but we have to use the multi-line element.
Always good to learn something. Again, thank you very much.
The main issue for us, thanks to your feedback, turned out to be that a text field element is not the right one for multi-line text, but we have to use the multi-line element.
Always good to learn something. Again, thank you very much.