cancel
Showing results for 
Search instead for 
Did you mean: 

How to insert a Carriage Return + Line Feed inside a TextView UI element ?

Former Member
0 Kudos

Hello All,

Does anyone know how can I achieve the above scenario ? I have a string variable that collects and appeneds text messages from various BAPI calls. At the end of the process, the contents of this variable will be mapped to a textview. Problem is, the length of the string collected is way too long and hence not very readable. I am not able to find a way to introduce a CRLF after each message is read and appended. Can anyone advise ? Thank you.

from

Kwok Wei

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Any news here? I'm also developing on sp12 so it would be great if anybody could just check sp13 on this line feed....

cheers

Stefan

Former Member
0 Kudos

Hi,

It is not working on SP13 also.

I have "\r\n" in a string attached to a view element of type "TextView".

But it is still showing everything in one line.

It works for the "TextEdit" element. So a work around could be to show it in a "TextEdit" element in read-only mode.

Thanks & Regards,

Renjith

Former Member
0 Kudos

Hi Renjith,

So far I manage to get find a walk-around to the problem by using the TextEdit as what you have suggested. This works fine... till when you try to print it out. As you see, during printing, I need to remove the vertical scrollbar and ensure that all the text are properly displayed and I do not see any visibleFooter = false option (similar to that of a table) available to the TextEdit.

If anyone has any suggestions or a more feasible walk around that allows me to print the entire contents in the TextEdit, that will be greatly appreciated

from

Kwok Wei

Former Member
0 Kudos

Rendering of the characters '\n' and '\r' in the TextView.text-property as HTML line breaks has just recently been added (SP 12?).

Until you get this SP, you may use the wrapping feature or use several TextView instances.

Armin

Former Member
0 Kudos

Pardon my ignorance Armin but when you mention SP12 are you referring to the WAS 6.40 SP12 ? If so then I'm afraid thats not working as the WAS that I am deploying my application to is already on SP12.

from

Kwok Wei

Former Member
0 Kudos

Yes, with SPxx I always mean Web AS 6.40 SPxx. I have to check if it was SP12 or SP13...

Armin

Former Member
0 Kudos

Hello Armin,

That will be very helpful is you can help me check it out if itsavailable on SP12 or SP13. Thnak you veyr much.

from

Kwok Wei

Former Member
0 Kudos

Hi,

Why cant you set the property wrapping to true and assign the textview a specific width.

Did u try adding "\n" ?

Regrds

Bharathwaj

Former Member
0 Kudos

Hello Bharathwaj.

I did tried with word wrapping but its still not very easy on the eyes. It will be ideal is i can introduce a CRLF after each comment is appended. I did try with "\n" as well but did not achieve the result that I wanted. Below is my code so perhaps you can spot my mistake ?

currentComment = (currentComment+ "EmpToMan : " + errorMessageEmpToMan + "\r\n");

from

Kwok Wei