I'm looking for a free control/component/library something like a rich text box for editing codes of python (or other languages.)
I like to have some fe开发者_运维百科atures:- Highlight codes
- Auto Indent
- Line numbering
- Defining new styles or rules of highlighting (for OpenType keywords)
Is there such a control? or I have to write my own?
Have a look at ScintillaNET.
ScintillaNET is a powerful text editing control for Windows Forms applications and a managed wrapper around the versatile Scintilla Windows control. Created with the developer in mind, the ScintllaNET API makes it simple to add advanced text editing and syntax highlighting to your application or IDE (Integrated Developer Environment) .
A commercial option is ActiPro Software's SyntaxEditor. The link is for a WPF version of the control. They also offer a WinForms version which I've used for XML editing - works very well.
From what I've read on the site, the WPF version supports ANTLR-generated lexer-parsers.
精彩评论