[MonoDevelop] Using gtksourceview as a widget in monodevelop

Michael Hutchinson m.j.hutchinson at gmail.com
Thu Nov 13 15:12:58 EST 2008

On Thu, Nov 13, 2008 at 2:23 PM, buhochileno at gmail.com
<buhochileno at gmail.com> wrote:
> Is the gtksourceview-sharp a good choice to make some code editor
> experiments?, or monodevelop is currently using a new widget?, do you

MD is using a new fully managed editor called Mono.TextEditor. You can
find it in the MD source.

> have some code to take a look to learn how to enable editor capabilities
> (code colors, autocompletation, identation, etc)?, I make a widget that

Autocompletion is much more complex, and we have significant
infrastructure in MD for it, independent of the text editor.

> inherit from GtkSourceView.SourceView, I see the "textbox" on my gtk
> window but even if I write c# code nothing happen, what is the minimum
> initialization needed, etc?

You need to look up and assign a SourceLanguage, and set
HighlightSyntax to true on the buffer. You can find a simple example
of usage here: http://anonsvn.mono-project.com/viewvc/trunk/gtksourceview2-sharp/sample/SourceViewTest.cs?view=markup

Michael Hutchinson

More information about the Monodevelop-list mailing list