How to indent/unindent a given text selection via toolbar button

Topics: Developer Forum
May 27, 2014 at 9:44 PM
I am adding a toolbar to the Scintilla editor and have 2 buttons indent/unindent. I do not see any code snippets for the code behind, nor does the sample program show how.

Some editors use Editor.SelectionIndent += 10;

Does Scintilla have something of that nature?
May 27, 2014 at 10:00 PM
Discovery...
private void tsbDecreaseIndent_Click(object sender, EventArgs e)
{
this.ScriptEditor.Commands.Execute(ScintillaNET.BindableCommand.BackTab);
}

private void tsbIncreaseIndent_Click(object sender, EventArgs e)
{
this.ScriptEditor.Commands.Execute(ScintillaNET.BindableCommand.Tab);
}

private void tsbComment_Click(object sender, EventArgs e)
{
this.ScriptEditor.Commands.Execute(ScintillaNET.BindableCommand.LineComment);
}

private void tsbUnComment_Click(object sender, EventArgs e)
{
this.ScriptEditor.Commands.Execute(ScintillaNET.BindableCommand.LineUncomment);
}
Marked as answer by wsfaso on 5/27/2014 at 3:00 PM