?
Solved

Transfer SynEdit contents to RichEdit

Posted on 2007-08-02
2
Medium Priority
?
317 Views
Last Modified: 2010-04-05
Hello experts,
using Delphi 7.

How do I copy the contents of a SynEdit to an TRichEdit keeping the highlighting of SynEdit?
0
Comment
Question by:Ioannis Anifantakis
2 Comments
 
LVL 26

Accepted Solution

by:
Tomas Helgi Johannsson earned 2000 total points
ID: 19615781
    Hi!
There should be an TSynExporterRTF class/component for that in the package.
See also the Export Demo which is included.

Regards,
  Tomas Helgi
0
 
LVL 6

Author Comment

by:Ioannis Anifantakis
ID: 19616181
true

I here show how I get to export from SynEdit to RichEdit using clipboard.
You have to drop a SynEdit, a SynEditExport, a SynEditHighlighter, a RichEdit, a button component for this

procedure TForm1.Button1Click(Sender: TObject);
begin
    Clipboard.Open;
    SynExporterRTF1.ExportAsText:=false;
    SynExporterRTF1.ExportAll(SynEdit1.Lines);

    SynExporterRTF1.CopyToClipboard;
    Clipboard.Close;
    RichEdit1.PasteFromClipboard;
end;
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question