🔒 Locked
Syntax Highlighting
Advertisement
Original Post
I have a program that I'm making for webpage editing. How can I get the textbox to highlight the syntax in the html file? I'm using a forms based vc++ project and I have a rich text box.
Okay, so how would i change the font and color mid way through the text?
Everything you ever wanted to know about Rich Edit probably. You'll want to pay special attention to the Text Formatting and "Text Selection" and "Current Selection in a Rich Edit Control"
There was once a Control Library, that allowed you to plug in a Syntax Highlighting Control.
I've used this, years ago. But sadly I don't remember it, and can't tell you anything about it's current state. Good luck in Google.
I've used this, years ago. But sadly I don't remember it, and can't tell you anything about it's current state. Good luck in Google.
Real-time syntax highlighting is a very complicated problem. See my earlier post in another thread on the topic.
I got mine working quite well, but it was a long, difficult process (weeks of hard work). I'd consider using ActiPro's controls if I were to do it all over again. I've never tried their syntax highlighting tool, but I use some of their .NET controls for other things and I've always been very impressed with their speed and polish.
I got mine working quite well, but it was a long, difficult process (weeks of hard work). I'd consider using ActiPro's controls if I were to do it all over again. I've never tried their syntax highlighting tool, but I use some of their .NET controls for other things and I've always been very impressed with their speed and polish.
I've heard of a .NET control called Fireball that does syntax highlighting.
I made a RichEdit-based C++ syntax highlighter from scratch in a day and a half. It's not perfect, and it's a bit slow, but it works for my needs. I would recommend something better for a commercial project.
Screenshots are available in my IOTD post.
E-mail me if you're interested and I can send you a copy of the source.
Screenshots are available in my IOTD post.
E-mail me if you're interested and I can send you a copy of the source.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement