views:

410

answers:

2

I'm looking for a free, syntax-highlighting, possibly autocompleting "Programmer's textbox" style control for use in a Visual Studio Windows Forms or WPF project. It should work with C# and self-defined languages, and the licence should permit its use in a closed, in-house development tool.

There are pay-for solutions available - something like http://www.syncfusion.com/products/user-interface-edition/windows-forms/Edit would work fine - but I am looking for something simpler, and would prefer not to pay for unnecessary functionality. Any ideas?

+6  A: 

I've been using the SharpCode.TextEditor for a few cases, and it works quite well - including syntax highlighting and all.

Check out this Using ICSharpCode.TextEditor article on CodeProject for an intro.

alt text

To download it, go to the SharpDevelop web site and download the latest sources. One of the projects included is the Text editor, which you can easily isolate into its own assembly or sub project - you get all the source code, after all!

marc_s
Just make sure you obey the LGPL.
ParmesanCodice
Looks good - but what would the impact of this being LGPL licensed be in regards to its use in an in-house-only tool? Judging by my quick wikipedia-ing, this would be fine.
Daniel I-S
http://en.wikipedia.org/wiki/LGPL - it basically allows you to link the code into your apps without further obligations, as long as you don't compete with the original author. E.g. you cannot create a .NET IDE and use their TextEditor as a component, and then sell or market that product
marc_s
For in-house use, I don't see any issues with the LGPL - but I'm not a lawyer, so don't take my word for it :-)
marc_s
Looks fantastic - thanks very much.
Daniel I-S
I'm no expert on OS licences either but I think the important points with LGPL are: 1. Give Credit 2. You are allowed to link to the library in commercial software 3. If you change anything in the library those changes must also be released as LGPL. Just something to bear in mind because in-house tools don't always remain in-house.
ParmesanCodice
+1  A: 

Scintilla is a powerful, open-source code editing component, and there is a .NET control available for it.

bta