Recent

Author Topic: Lazarus need an TRichEdit component urgent!  (Read 13353 times)

Fossy

  • New Member
  • *
  • Posts: 22
Lazarus need an TRichEdit component urgent!
« on: March 16, 2006, 06:21:13 am »
Hello friends:

I'm porting an large application of Delphi to Lazarus, and the exclusive problem that I'm having is that Lazarus not have TRichEdit component.

I think that if Lazarus can have it component, we can make any application without limitations!!

Thanks for all development team!!.

tech-pro

  • Full Member
  • ***
  • Posts: 173
    • Tech-Pro.net
RE: Lazarus need an TRichEdit component urgent!
« Reply #1 on: March 16, 2006, 09:29:22 am »
Can't you use SynEdit? I don't think other platforms than Windows have a RichEdit control, which would make implementing one in LCL rather difficult.
Julian

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
RE: Lazarus need an TRichEdit component urgent!
« Reply #2 on: March 16, 2006, 09:56:32 pm »
Qt has native RichEdit support also, and I bet there are ways to make one work on Gtk. Much harder then with Qt, but perhaps possible.

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Lazarus need an TRichEdit component urgent!
« Reply #3 on: March 16, 2006, 11:45:32 pm »
Quote from: "Fossy"
Hello friends:

I'm porting an large application of Delphi to Lazarus, and the exclusive problem that I'm having is that Lazarus not have TRichEdit component.


How are you using TRichEdit? If you're using it just to view RTF, for example a report, you can use any external word processor to do that. All major word processors (Word, OO, Neo on Mac) have excellent support for RTF.

If you're using TRichEdit to create RTF programmatically, just generate the RTF yourself (get the spec from Microsoft), or generate HTML and display it with the TIpHtmlPanel component.

If you're using TRichEdit to create RTF via user entry and editing, you're out of luck. SynEdit won't work for this either.

Please give us some more details on how you're using TRichEdit.

Anonymous

  • Guest
Lazarus need an TRichEdit component urgent!
« Reply #4 on: March 17, 2006, 03:28:53 pm »
In the first place, thanks to all, I will answer to you one by one...

Tech-Pro: I can't use SynEdit because I need some controls like bullets, background image, post images, change fonts and sizes, center - left - right and justify text..., Really I need to make an editor like WinWord of Windows or more rich.

Sekel: Yes, I think that with GTK can make an RichEdit component, because exists some applications (like Abiword) written in GTK based library, although I recognize that it does not have to be easy.

QT have RichEdit controls, but Lazarus can't import librarys (or I not know other alternative way for import that controls).

Phil: I am going to explain why I need a richedit control...

Actually, my app (windows version) is for associations and really really is a projects creator to present to official organisms. It has an assistant of creation of projects, uses much pre-created templates, and the app asists to you for making that projects.

That templates, assistant, menus (for adding data of databases automatically) and other options is based entirely in an WYSIWYG Rich editor. I can't use external editors because I can't put data, tables, images and more...

The attractiveness of my application is that it makes documents at the request of the user, that is to say, who the user is writing his project and must have options for incorporate automatically data that it extracts of the databases, and I need to have all control of RichEdit for put tables, images, texts and more in runtime.

I don't know if exists any Rich Editor in Linux that it allows to be controlled by external applications (with all of I need). In that case it would be a good option.
 
Thanks!!! :)

Fossy

  • New Member
  • *
  • Posts: 22
Lazarus need an TRichEdit component urgent!
« Reply #5 on: March 17, 2006, 03:31:40 pm »
Oooopsssss..., the user Guest of above I am. I forgot loggin before write the post  :roll:

Phil

  • Hero Member
  • *****
  • Posts: 2737
Lazarus need an TRichEdit component urgent!
« Reply #6 on: March 17, 2006, 05:38:25 pm »
Quote from: "Anonymous"

The attractiveness of my application is that it makes documents at the request of the user, that is to say, who the user is writing his project and must have options for incorporate automatically data that it extracts of the databases, and I need to have all control of RichEdit for put tables, images, texts and more in runtime.


It sounds like you need to create RTF programmatically. You don't need a control to do this. RTF is just a text file and you can create it yourself, then use an external word processor to display the RTF file.

I'm not sure how your app works now. I don't believe TRichEdit supports tables, templates, etc. You need to use a real word processor for that. Again, all of these features are supported in RTF and all major word processors support RTF, so it seems like that's what you should use.

You can also manipulate an external word processor from your program. On Windows this is easy as both Word and OpenOffice have Automation servers that allow a client (your program) to do anything remotely that a user can do interactively. On Linux and OS X, you'll have to use the forbidding UNO interface to OO. OO has bindings for C++ and Java, but not currently for Pascal. Maybe you could create the bindings and advance the state of Lazarus and Free Pascal.

Fossy

  • New Member
  • *
  • Posts: 22
Lazarus need an TRichEdit component urgent!
« Reply #7 on: March 18, 2006, 02:42:30 am »
Hello Phil:

I cound can create a text file with paragraphs and RTF code for view it in other editors, but my app need design time interface for the user (Rich editor or word proccesor).

I have find an alternative..., I'm thinking in to use an WYSIWYG word processor html. I need to prove it and I'm not sure if could be totally valid for me, but I don't have other ways.

When I finish my app, I'm considering in making a component richedit for Lazarus based in native TImage writing directly in canvas. This will depend on the time that I has available, but I will try it.

Thanks!!

 

TinyPortal © 2005-2018