The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Inserting RTF code to show up as RTF formatted text in RichEdit Field
#1
Hi Gintaras,
Hope all is well. I was wondering if there was a way to insert a string of RTF code: e.g.


Quote:{\rtf1 \ansi \deff0 {\fonttbl {\f0 Monotype Corsiva;}} \qc \f0 \fs120 \i \b Hello,\line World!}



and have it appear properly formatted as RTF in RichEditField.

I saw the function RichEditLoad but this seems to only take .rtf file of text already preformatted as RTF (e.g. using RTF editor like wordpad) and then loading as RTF formatted text. If I supply actual RTF code (like above) in .txt file, it inserts directly as simple text.

I am hoping to supply something like the exact string above and replace what is in RichEditField.

Or even better, getting RTF code out of RichEdit box using getsel with CF_RTF and then editing RTF tags slightly, then re-inserting to appear as RTF-formatted text.

I know that these will have to be in same exe/qm.

I think of this as similar to changing html formatting tag and then refreshing browser or reloading html file - but I understand that Win32/Winforms etc,  is different than html!

Is this possible?

Thanks so much,
S


Messages In This Thread
Inserting RTF code to show up as RTF formatted text in RichEdit Field - by stupomer - 03-21-2018, 12:05 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)