1. Peter Moran
  2. PowerBuilder
  3. Monday, 10 May 2021 16:50 PM UTC

Hi,
Was wondering if there is any way to set the default font of a RichTextEdit control at runtime?

I'd like the control to remember what the user has chosen and to default to this the next time they access the control.

Part of the problem is the user may be using fonts that I don't have access to at design time (e.g. Japanese fonts).

Thanks,
Peter

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Monday, 10 May 2021 19:40 PM UTC
  2. PowerBuilder
  3. # 1

Hi,

Assigning a font to the rte attribute does NOT work. What you have to do, is set the font that you want with maybe a single space character. The use rte_1.copyrtf() function to get the "code" that you can store somewhere and later assign to the rte using pastertf().

 

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 10 May 2021 17:40 PM UTC
  2. PowerBuilder
  3. # 2

Hi Peter;

  FWIW: I would personally save the App user's RTE control's / RT DWO's default font preferance in an INI file and then restore that setting upon App restart.

Regards ... Chris

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.