Questions? Feedback?powered byOlark live chat software
Bug 2723

Problem trying to retrieve all the text in a richtextedit control 15 May, 2019

David Salmerón
14 May, 2019
Product: PowerBuilder Category: Controls & UI
Version: 2017 R3 Publishing: Public
Status: Scheduling Priority: P3
Classification: Appeon bug Resolution:
Mark Lee 15 May, 2019
Hi David,

Yes, you are right. We are also missing the final dot.
We reproduced it on our end and will do further research to figure it out.
We will keep you posted about the progress.

Mark Lee
David Salmerón 14 May, 2019
RTE_issue.png (40KB)

Thanks Mark for the quick answer. However, I am afraid the problem remains unsolved. Maybe I didn't make myselft clear enough. 

I am aware that the rtf string is using "/par", which as far as I understand, is the correct syntax. However, we do not generate these strings ourselves; they come from a different application and are stored in the database. Our purpose is to get the same string in "plain text" format. In this particular example, we are expecting to get a string that ends with "tortor.", plus a "new line" (CR+LF). But we only get "tortor" (without the dot) and no new line.

I am attaching a screenshot of the dummy application we made to test the error. In the upper part you can see the text as it appears in the control, and below what we get with the SelectedText command.

The problem, as you can see, is not strictly on the carriage return: we are also missing the final dot. 
We have tried several rtf strings and always lose some of the characters in the end.
Mark Lee 14 May, 2019
Hi David,

Thanks for reporting this problem.
We checked the format of the provided rtf, and found that "tortor.\par" instead of "tortor.~r~n" is used for the PasteRTF method in the PB code.
If you need to use the format "tortor.~r~n", please try to replace it with contents of "tortor.~~r~~n \par".
Besides, "~" and "\" are special characters in rtf, so you cannot get the values with what you see on UI.
Please let us know if the above resolves your problem.

Mark Lee
Mark Lee 14 May, 2019
rtf content
David Salmerón 14 May, 2019
RTE_issue.txt (2KB)

We use a richtextedit control to convert RTF text to plain text. The string we get has some missing characters at the end.

*Reproduce Steps:
Paste the RTF text into the control:
Get the string in plain format:
ls_txt = rte_texto.SelectedText()

The string is missing two or three characters at the end. In the example provided, we get "tortor" instead of "tortor.~r~n" as expected.

Powerbuilder 2017 R3 Build 1880.
Using "Built-in TX Text Control" in Application Additional Properties | RichTextEdit tab.
Windows 8 
Database Type:
SAP SQL Anywhere 
Database Version:
SQL Anywhere Personal Server Version