Recent

Author Topic: lzRichEdit  (Read 2287 times)

Pancratius

  • New Member
  • *
  • Posts: 14
lzRichEdit
« on: August 20, 2015, 04:02:44 pm »
Hello, I use lzRichEdit as a simple text editor. With lzRichEdit I can insert images into the text file, but for some reason the images don't get saved. If I for instance create a doc- file, insert an image, save it, close the file and open the doc-file again, there is no image - only the text gets saved.

I guess I'm doing something wrong while saving the file since no compund document is created. I use only the savedialog. The crew behind lzRichEdit say in their wiki-artikel that "The image support is left up to 3 units, RichOleBox, RichOle, GTKTextImage, These units are in the sample folder and can be placed along with the source code of your program. " Well, when I these three pas-files but the program wont compile, complaining about GTKTextimage. When removed the program compiles just fine but still no saved images.  Any suggestions?

kjteng

  • Full Member
  • ***
  • Posts: 178
Re: lzRichEdit
« Reply #1 on: October 08, 2015, 08:45:26 am »
I am using lzRichedit subversion 372 with Lazarus 1.4.2
No problem in compilation and installation.
I do have the same problem in you that sometime image in the rtf document is not displayed. After some testing, I found that the image would not be display if the readonly property = true when I call loadfromfile method. So my temporary solution is to set the readonly to false before I open a file. Something like this
with lzRichEdit1 do
begin
  tmp := Readonly;
  ReadOnly := False;
  try
    LoadFromFile('xxxx')
  finally
    ReadOnly := tmp
 end;
end;

Hope this help