Article View: borland.public.cppbuilder.nativeapi
Article #17686Re: Syntax hightlight
From: Remy Lebeau (TeamB)
Date: Wed, 05 Mar 2003 18:18
Date: Wed, 05 Mar 2003 18:18
36 lines
2805 bytes
2805 bytes
Syntax highlighting is no simple chore. The fact that an entire component
(and there are many third-party ones, actually) was written from scratch to
handle it efficiently should tell you something about that. The native VCL
components (TRichEdit in particular) are not designed to natively handle
what you're asking for. Sure, they can be tweaked and hacked to implement
syntax highlighting in a round-about fashion, but they will never be able to
come close to achieving the same results as efficiently as a
specifically-designed component, such as SynEdit or any number of others
that are available.
You don't have to know Pascal in order to use the components. Just install
them and use them from the Component Palette like any other component.
Personally, I do use SynEdit in my own projects, and I can tell you that it
by far better than TRichEdit will ever hope to be. And it is very
extendable - you can even write your own custom parsers for it to support
different formats. Sure, it has a few quirks here and there, but it also
has its own public forum for tech support.
Now, with that said, if you're die-hard on using TRichEdit (which I strongly
suggest you not be), then have a look here for extensive information on
using TRichEdit for a variety of purposes:
http://home.att.net/~robertdunn/Yacs.html
Specifically, at the "Faster Rich Edit Syntax Highlighting" article:
http://home.att.net/~robertdunn/Papers/FasterSyntaxHighlighting.doc
Gambit
"ScOe" <sven.savic@zg.hinet.hr> wrote in message
news:3e659927@newsgroups.borland.com...
> well that didnt helped me much ... source code is in pascal,
> which i dont know that well, and i dont want to use other
> components to do work for me ... but thanx anyway ...
Technical Details
Message-ID:
<3e663d61$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3e64f2d4@newsgroups.borland.com> <t8t96vopms9tf8vpsnekak6id9mcsas2jl@4ax.com> <3e659927@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,59072186333137e8 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-03-05 10:13:28 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3e64f2d4@newsgroups.borland.com> <t8t96vopms9tf8vpsnekak6id9mcsas2jl@4ax.com> <3e659927@newsgroups.borland.com> Subject: Re: Syntax hightlight Date: Wed, 5 Mar 2003 10:18:30 -0800 Lines: 38 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 207.175.226.26 Message-ID: <3e663d61$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1046887777 207.175.226.26 (5 Mar 2003 10:09:37 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail