A (hopefully) easier way to use ScintillaNET in Windows Forms
The easiest way to install is to use NuGet!
> Install-Package EasyScintilla
The goal was to make Scintilla as easy as possible to drop into a Windows Forms project.
From the forms designer, simply drag the SimpleEditor
control from the toolbox onto the form.
Then, in the code behind set the Styler
property.
this.simpleEditor1.Styler = new CSharpStyler();
That's it!
Some users have been having issues where the SimpleEditor
control does not get added to the Designer Toolbox.
To fix that, follow these steps:
- If you've not done so already, install EasyScintilla
- Open up the Windows Forms Designer
- Right click on the empty space in the Toolbox, and click "Choose Items"
- Once it has finished loading, click Browse.
- Navigate to your project directory, and look for the folder called "packages". This is where Visual Studio saves your NuGet packages after you install them.
- Navigate to
[solution_root]\packages\jacobslusser.ScintillaNET.3.6.3\lib\net40
and choose the fileScintillaNET.dll
and click OK. - Navigate to
[solution_root]\packages\EasyScintilla.1.0.3\lib\net40
and chooseEasyScintilla.dll
and click OK. - Click OK.
- You should now see both the
Scintilla
andSimpleEditor
controls appear in the Toolbox.Scintilla
is the base editor from Scintilla.NET andSimpleEditor
is from this project.
I've built a few stylers into EasyScintilla, but I will happily take pull requests for new stylers.
You can create your own stylers be deriving from the abstract class ScintillaStyler
Examples can be found in the Stylers
Directory.
Language | Styler Class |
---|---|
C# | CSharpStyler |
HTML | HtmlStyler |
PowerShell | PowerShellStyler |
Python | PythonStyler |
Ruby | RubyStyler |
SQL | SqlStyler |
Teradata Parallel Transporter (TPT) | TptStyler |
Windows Batch | BatchStyler |