Jump to content
  • Advertisement
Sign in to follow this  
Jnz86

[.net] RichTextBox syntax highlight flickering

This topic is 4872 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I am using RichTextBox class to display some text, and then I want to syntax highlight whats written to it. So, i use Find(...) to select required text and then use SelectionFont,SelectionColor to changle font/color of the words i need. The problem is that when i type, i have to do this when the text changes, and i actually see how text gets selected and changes it's color, and that is very annoying... So, my question is, how to solve this problem? Maybe i can somehow disable redrawing of control till i completely highlighted control or smthing like ? (Sorry for my bad English) (And btw, i use C++)

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by jods
Maybe you should consider using the #develop text editor control.
It's free and quite good.

http://icsharpcode.com/

From their website:
" What is #develop? SharpDevelop is a free IDE for C# and VB.NET projects on Microsoft's .NET platform."

I dont see any C++, so it doesn't fit me...
But, thanks for info anyway :)

Share this post


Link to post
Share on other sites
#develop does have a c++ section, it just doesnt list it on their home page. It also has a nifty class wizard too.
But if you are using .NET I reccomend you use c#. So if you want to use c++.net or learn c# I reccomend you download this great IDE.

Share this post


Link to post
Share on other sites
Hi,
but i have an IDE already: Microsoft Visual Studio .NET 2003
so i don't need an IDE
but because it is free i maybe take a look at it for my next project,

Share this post


Link to post
Share on other sites
Sorry, I wasn't clear enough.

#develop is an open-source IDE. But you can grab just their text control and use it in your app.
It has many feature, notably custom syntax highlighting. So it could just be a drop-in replacement for your RichTextBox.

If you prefer to stick with a RichTextBox, have a look on codeproject, they have many articles about adding syntax highlighting to a RTB. For example, this one:

Enabling syntax highlighting in a RichTextBox

(You can search for others, but this one has a very good users-rating.)

'hope this helps,
jods

Share this post


Link to post
Share on other sites
Quote:
Original post by jods
Sorry, I wasn't clear enough.

#develop is an open-source IDE. But you can grab just their text control and use it in your app.
It has many feature, notably custom syntax highlighting. So it could just be a drop-in replacement for your RichTextBox.

If you prefer to stick with a RichTextBox, have a look on codeproject, they have many articles about adding syntax highlighting to a RTB. For example, this one:

Enabling syntax highlighting in a RichTextBox

(You can search for others, but this one has a very good users-rating.)

'hope this helps,
jods


this is what i needed http://www.c-sharpcorner.com/Code/2003/June/ColorSyntaxEditor.asp
thanks

rating++

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!