 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Rory Walsh Guest
|
Posted: Wed Mar 30, 2005 11:03 am Post subject: Syntax highlighting? |
|
|
Can anyone suggest an easy and efficient way to perform syntax
highlighting in a TMemo or a richedit, whichever is best. Basically all
I need to know is how to change the color of only a small portion of the
text. If anyone has any ideas I'd love to hear them.
regards,
Rory.
|
|
| Back to top |
|
 |
Pete Fraser Guest
|
Posted: Wed Mar 30, 2005 11:10 am Post subject: Re: Syntax highlighting? |
|
|
Rory Walsh wrote:
| Quote: | Can anyone suggest an easy and efficient way to perform syntax
highlighting in a TMemo or a richedit, whichever is best. Basically all
I need to know is how to change the color of only a small portion of the
text. If anyone has any ideas I'd love to hear them.
|
Personally, I wouldn't bother re-inventing the wheel and would download
synedit from http://synedit.sourceforge.net/
It's free and very well supported.
However, if you do want to do it the hard way, look at
http://home.att.net/~robertdunn/Yacs.html for some hints.
There is a whitepaper on doing syntax hilighting.
HTH Pete
|
|
| Back to top |
|
 |
Rory Walsh Guest
|
Posted: Wed Mar 30, 2005 11:35 am Post subject: Re: Syntax highlighting? |
|
|
Cheers, I'll check out synedit. The only advantage to doing it the hard
way is that I learn how to it in the first place.
cheers,
Rory.
Pete Fraser wrote:
| Quote: | Rory Walsh wrote:
Can anyone suggest an easy and efficient way to perform syntax
highlighting in a TMemo or a richedit, whichever is best. Basically
all I need to know is how to change the color of only a small portion
of the text. If anyone has any ideas I'd love to hear them.
Personally, I wouldn't bother re-inventing the wheel and would download
synedit from http://synedit.sourceforge.net/
It's free and very well supported.
However, if you do want to do it the hard way, look at
http://home.att.net/~robertdunn/Yacs.html for some hints.
There is a whitepaper on doing syntax hilighting.
HTH Pete
|
|
|
| Back to top |
|
 |
Dirk Schnitzler Guest
|
Posted: Wed Mar 30, 2005 1:09 pm Post subject: Re: Syntax highlighting? |
|
|
Well, if you want to do it the hard way,
try a TRichEdit and look for "SelAttributes"
in the help file.
Regards, Dirk.
"Rory Walsh" <rorywalsh (AT) ear (DOT) ie> schrieb im Newsbeitrag
news:424a878f$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Can anyone suggest an easy and efficient way to perform syntax
highlighting in a TMemo or a richedit, whichever is best. Basically all
I need to know is how to change the color of only a small portion of the
text. If anyone has any ideas I'd love to hear them.
regards,
Rory.
|
|
|
| Back to top |
|
 |
Rory Walsh Guest
|
Posted: Wed Mar 30, 2005 1:49 pm Post subject: Re: Syntax highlighting? |
|
|
Cheers, at least I now know how to change the font of a particular
selection. I tried the SynEdit that was mentioned but it won't install
for me. I am using a personal edition of C++ Builder and I am missing a
few of the libraries needed. I was able to use some libraries that I had
left over on a demo install of C++ Builder Pro but I still get a missing
file error, 'VCLEditors.dcu'? I don't have it anywhere on my disk. After
seeing the hard way to do syntax highlighting it would be great to get
this going. I realise that this should be directed to the developers of
SynEdit but perhaps someone here has had this problem before, here is
the latest error:
[Pascal Fatal Error] SynEditPropertyReg.pas(63): File not found:
'VCLEditors.dcu'
Rory.
Dirk Schnitzler wrote:
| Quote: | Well, if you want to do it the hard way,
try a TRichEdit and look for "SelAttributes"
in the help file.
Regards, Dirk.
"Rory Walsh" <rorywalsh (AT) ear (DOT) ie> schrieb im Newsbeitrag
news:424a878f$1 (AT) newsgroups (DOT) borland.com...
Can anyone suggest an easy and efficient way to perform syntax
highlighting in a TMemo or a richedit, whichever is best. Basically all
I need to know is how to change the color of only a small portion of the
text. If anyone has any ideas I'd love to hear them.
regards,
Rory.
|
|
|
| Back to top |
|
 |
Jim Dodd Guest
|
Posted: Wed Mar 30, 2005 2:32 pm Post subject: Re: Syntax highlighting? |
|
|
Rory Walsh wrote:
| Quote: | Cheers, at least I now know how to change the font of a particular
selection. I tried the SynEdit that was mentioned but it won't install
for me. I am using a personal edition of C++ Builder and I am missing a
few of the libraries needed. I was able to use some libraries that I had
left over on a demo install of C++ Builder Pro but I still get a missing
file error, 'VCLEditors.dcu'? I don't have it anywhere on my disk. After
seeing the hard way to do syntax highlighting it would be great to get
this going. I realise that this should be directed to the developers of
SynEdit but perhaps someone here has had this problem before, here is
the latest error:
[Pascal Fatal Error] SynEditPropertyReg.pas(63): File not found:
'VCLEditors.dcu'
Rory.
Dirk Schnitzler wrote:
Well, if you want to do it the hard way,
try a TRichEdit and look for "SelAttributes"
in the help file.
Regards, Dirk.
"Rory Walsh" <rorywalsh (AT) ear (DOT) ie> schrieb im Newsbeitrag
news:424a878f$1 (AT) newsgroups (DOT) borland.com...
Can anyone suggest an easy and efficient way to perform syntax
highlighting in a TMemo or a richedit, whichever is best. Basically all
I need to know is how to change the color of only a small portion of the
text. If anyone has any ideas I'd love to hear them.
regards,
Rory.
|
I can only find that file in BCB6 (I also have BCB5 and BCB3 installed)
and it is in the CBuilder6SourceToolsapi directory. I'm sure that
isn't in the Personal Edition nor would it be in the Demo version.
Sorry,
Jim Dodd
Onset Computer Corp.
|
|
| Back to top |
|
 |
Vladimir Stefanovic Guest
|
Posted: Wed Mar 30, 2005 5:45 pm Post subject: Re: Syntax highlighting? |
|
|
If you have some trivial (rules) to parse and highlight
than use TRichEdit and look at:
http://thunder.prohosting.com/~cbdn/a_syn.htm
--
Best regards,
Vladimir Stefanovic
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Wed Mar 30, 2005 7:09 pm Post subject: Re: Syntax highlighting? |
|
|
"Rory Walsh" <rorywalsh (AT) ear (DOT) ie> wrote
| Quote: | I still get a missing file error, 'VCLEditors.dcu'?
|
That is a BCB6 file. Are you using BCB6 to begin with?
Gambit
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Wed Mar 30, 2005 7:11 pm Post subject: Re: Syntax highlighting? |
|
|
"Jim Dodd" <bcbuilderboy (AT) yahoo (DOT) com> wrote
| Quote: | I can only find that file in BCB6
|
That is because it is a BCB6-only to begin with.
| Quote: | it is in the CBuilder6SourceToolsapi directory. I'm sure
that isn't in the Personal Edition nor would it be in the
Demo version.
|
I'm sure it would be avaiable, since it is the library for the
VCLEditors.hpp file, which is used for writing design-time
component/property editors. I would be very surprised if the Personal
edition does not allow the user to write custom components.
Gambit
|
|
| Back to top |
|
 |
Rory Walsh Guest
|
Posted: Wed Mar 30, 2005 11:09 pm Post subject: Re: Syntax highlighting? |
|
|
Yes, I'm using a personal edition?
Remy Lebeau (TeamB) wrote:
| Quote: | "Rory Walsh" <rorywalsh (AT) ear (DOT) ie> wrote in message
news:424aae6c (AT) newsgroups (DOT) borland.com...
I still get a missing file error, 'VCLEditors.dcu'?
That is a BCB6 file. Are you using BCB6 to begin with?
Gambit
|
|
|
| Back to top |
|
 |
Rory Walsh Guest
|
Posted: Wed Mar 30, 2005 11:14 pm Post subject: Re: Syntax highlighting? |
|
|
Great that looks like it will serve my needs. Cheers,
Rory.
Vladimir Stefanovic wrote:
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|