Recent

Author Topic: Ms word  (Read 1809 times)

amir.eng

  • Jr. Member
  • **
  • Posts: 99
Ms word
« on: June 10, 2023, 10:38:04 am »
Hello everyone,
Is it possible to create a text editor like Ms word in Lazarus ?

I have worked with Lazarus spreadsheet and it was so great because I could implement spreadsheet in Lazarus forms. Now I'm trying to implement Ms word or wordpad in Lazarus with some tools for example allign texts, text size or color, create table.
Lazarus 3.0 , FPC 3.2.2 , Windows 10 64, Excel 2016 64

TRon

  • Hero Member
  • *****
  • Posts: 2435
Re: Ms word
« Reply #1 on: June 10, 2023, 10:47:39 am »
Is it possible to create a text editor like Ms word in Lazarus ?
Provided you have the time to do so, yes.

Quote
Now I'm trying to implement Ms word or wordpad in Lazarus with some tools for example allign texts, text size or color, create table.
For wordpad-a-like functionality (rtf) you could take a look at lzRichedit (https://wiki.freepascal.org/lzRichEdit), Richmemo (https://wiki.freepascal.org/RichMemo) or KMemo (https://wiki.freepascal.org/KControls#KMemo_control)

There are probably more richedit related components/control but the above should be able to get you started ?

amir.eng

  • Jr. Member
  • **
  • Posts: 99
Re: Ms word
« Reply #2 on: June 10, 2023, 12:16:58 pm »
Thank you so much, I tried Richedit, but I got this error :
"Unable to find the component : "TlzRichEdit"

After trying to add the component, I came across this error :
"UTF8LowerCase"
Lazarus 3.0 , FPC 3.2.2 , Windows 10 64, Excel 2016 64

wp

  • Hero Member
  • *****
  • Posts: 11858
Re: Ms word
« Reply #3 on: June 10, 2023, 12:39:01 pm »
AFAIK, TlzRichEdit is unmaintained at the moment. I recently used TRichMemo and TKMemo, and they are working (I did not use the OPM versions, though, but the versions from the developers' sites; but I guess the OPM versions should be working as well).

I am not a heavy user of these components, but it is my impression that none of them allows to add tables to the rtf. And in case of TRichMemo I did not find a way how to add pictures (although it does display a picture pasted from the clipboard).

To get you started: See my post on the German Lazarus forum for a simple MiniEditor based on TRichMemo (https://www.lazarusforum.de/viewtopic.php?p=135708#p135708). But note that usability of this editor is far from perfect.
« Last Edit: June 10, 2023, 01:57:19 pm by wp »

TRon

  • Hero Member
  • *****
  • Posts: 2435
Re: Ms word
« Reply #4 on: June 10, 2023, 01:47:02 pm »
@wp: Thank you for pointing out that lzRichEdit is currently not maintained as I was not aware.

@amir.eng: sorry for having suggested lzRichEdit. Would I have known that it is currently not maintained then I would not have suggested it.

amir.eng

  • Jr. Member
  • **
  • Posts: 99
Re: Ms word
« Reply #5 on: June 10, 2023, 04:03:32 pm »
Thank you @wp,
I downloaded it from the forum. It's great.
My program is for adding engineering projects information which are saved in database by user, and I have put RichMemo for each project inside program. Do you think it's pssible to carry it out ?
Lazarus 3.0 , FPC 3.2.2 , Windows 10 64, Excel 2016 64

metis

  • Sr. Member
  • ****
  • Posts: 300
Re: Ms word
« Reply #6 on: June 10, 2023, 04:47:19 pm »
« Last Edit: June 10, 2023, 07:53:43 pm by metis »
Life could be so easy, if there weren't those f*** Details.
My FFmpeg4Lazarus = FFPlay4Laz + FFGrab4Laz + FFInfo4Laz

 

TinyPortal © 2005-2018