开发者

VB.NET - New text editor? (Syntax Highlighting and Syntax Extraction)

开发者 https://www.devze.com 2023-01-07 05:38 出处:网络
I\'m thinking of developing a more efficient version of the Rich Text format but I need to know a little about Syntax Highlighting and Syntax Extraction.

I'm thinking of developing a more efficient version of the Rich Text format but I need to know a little about Syntax Highlighting and Syntax Extraction.

Like when r开发者_Go百科eading the file, read all the {Property Boxes} and use them in a RichTextBox. Ex:

{C=0000FF}Hello world!{/C} Prints "Hello world!" in red.

This would also be good to figure out because I am also building acode editor for a very simple version of Python and color codded text would make things easier and seems pretty standard.


There's a codeproject article about this called Syntax highlighting textbox written in C# which might give you some pointers.

And in case you're going to use a RichTextBox I'd suggest this blog post Some RichTextBox tricks .

It might be worth trying to get hold of the book Dissecting a C# Application: Inside SharpDevelop which has a chapter called Chapter 9: Syntax Highlighting (quite old book but might be able to get a second hand copy).

0

精彩评论

暂无评论...
验证码 换一张
取 消