Setting RTF font is changing all the previously entered text

Discussion forum about all things Team Developer 5.x and 6.x
a_sivababu
India
Posts: 524
Joined: 10 Mar 2017, 08:46
Location: Chennai,India

Setting RTF font is changing all the previously entered text

Post by a_sivababu » 18 Sep 2015, 12:44

This is regarding setting the standard font name, size, font color in global and apply for all the RTF controls.

But the problem is, the existing text in RTF is changed if I dynamically set the font size of RTF control using SalRTFTextSetFont. I feel it should apply only for new text. There is no issues if I set the font size from RTF toolbar. However, setting font size in manual way is time consuming process.

Is there any solution to retain predefined text and then apply the font size for the newly entered text.

Attached is the sample for both run time and manual cases.

Thanks!
Siva A
You do not have the required permissions to view the files attached to this post.

User avatar
H3PO4
Germany
Posts: 265
Joined: 10 Mar 2017, 07:53
Location: Rohlstorf, Germany

Setting RTF font is changing all the previously entered text

Post by H3PO4 » 25 Sep 2015, 13:00

Hi Siva A,

I discovered that there may be a lack of initialisation when Richtext Control is being created.

You can try this:
- select some text
- change text to Times New Roman (no change at all)
- click for example at the end of your text (no text is selected) or again select some text
- choose a font with 'Font Family Selection' and
- Set Font

Now only the selected font is changed or, when no text was selected, new text is shown with new selected font.

That means, only the first font change changes ALL, subsequent changes behave as wanted.

So we can (until Gupta repairs this little issue) make use of a workaround at creation time. See the enhanced sample attached.

Best regards
Henning
You do not have the required permissions to view the files attached to this post.

User avatar
Steve Leighton
Site Admin
Site Admin
New Zealand
Posts: 137
Joined: 05 Mar 2017, 20:57
Location: Tauranga, New Zealand <--> Stroud, England

Re: Setting RTF font is changing all the previously entered text

Post by Steve Leighton » 16 Jan 2020, 05:06

Henning
Brilliant. Thanks for the insight. Saved my bacon.
Greetings from New Zealand
Steve Leighton

Bankside Systems Ltd.
UK ♦ Australia ♦ New Zealand

www.banksidesystems.co.uk

Image

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 1 guest