Recent

Author Topic: Rich Text components  (Read 4162 times)

mtanner

  • Sr. Member
  • ****
  • Posts: 287
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: 14369
  • Sensorship about opinions does not belong here.
Re: Rich Text components
« Reply #1 on: February 27, 2019, 01:14:43 pm »
For Lazarus? RichMemo.
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

mtanner

  • Sr. Member
  • ****
  • Posts: 287
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: 2793
    • 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 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

 

TinyPortal © 2005-2018