Recent

Author Topic: Rich Text components  (Read 762 times)

mtanner

  • Full Member
  • ***
  • Posts: 226
Rich Text components
« on: February 27, 2019, 12:43:53 pm »
I am confused and would welcome some guidance. I would like to display RTF from within my program, but there seem to be multiple likely components, such as TRichEdit, lzRichEdit, and also others I think. My question is which one should I use? I prefer a mainstreeam component, rather than an add-on which may have limited future support, and good documentaion and samples. I am not looking for extensive features, just the ability to load some RTF text into the component (presumably via a TStrings) and have it displayed in some kind of memo-like component. Image display would be nice but not essential. I do not need the user to be able to edit the text, my requirement is display-only.

I could alternatively use HTML instead of RTF, if there is a good HTML renderer available.


Thaddy

  • Hero Member
  • *****
  • Posts: 8179
Re: Rich Text components
« Reply #1 on: February 27, 2019, 01:14:43 pm »
For Lazarus? RichMemo.
Read the manuals and if you are a professional get a proper education in computer science. Makes the forum a lot cleaner.

mtanner

  • Full Member
  • ***
  • Posts: 226
Re: Rich Text components
« Reply #2 on: February 27, 2019, 11:11:52 pm »
I downloaded RichMemo and tried installing it. but got various problems.  The package would not compile.

dbannon

  • Hero Member
  • *****
  • Posts: 587
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Rich Text components
« Reply #3 on: February 28, 2019, 12:10:31 am »
Mtanner, you did not mention which platform you are targeting.

Richmemo is (last time I checked) OK on Linux and Windows but missing some functionality. But on Mac, missing a lot more functionality.
http://wiki.freepascal.org/RichMemo/WorkArounds

KControls (Install using OnLinePackage Manager) works cross platform (Linux, Windows and Mac at least). You only need KMemo but have to install whole package, it provides a lot of capability, most of which you probably don't need. Pretty easy to use once you get used to the way it thinks.
http://wiki.freepascal.org/KControls/KmemoNotes

I think its fair to say there have been more updates, recently, to KControls than Richmemo but understand that the 'owner' or KControls has indicated he is no longer willing to put a lot of time into its development but is accepting patches. I had a long discussion with him that ensured it does, now, have a license 'we' can continue to use and take on its development indepently ourselves  if necessary ;D

Richmemo does live within the Lazarus community.

Davo
Lazarus 1.8, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng