本文整理汇总了C#中ScintillaNET.Scintilla.SetSelectionBackColor方法的典型用法代码示例。如果您正苦于以下问题:C# Scintilla.SetSelectionBackColor方法的具体用法?C# Scintilla.SetSelectionBackColor怎么用?C# Scintilla.SetSelectionBackColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ScintillaNET.Scintilla
的用法示例。
在下文中一共展示了Scintilla.SetSelectionBackColor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetupScintilla
private void SetupScintilla(Scintilla scintilla)
{
scintilla.StyleResetDefault();
scintilla.Styles[Style.Default].Font = "Consolas";
scintilla.Styles[Style.Default].Size = 10;
scintilla.StyleClearAll();
// Configure the CPP (C#) lexer styles
scintilla.Styles[Style.Cpp.Default].ForeColor = Color.Silver;
scintilla.Styles[Style.Cpp.Comment].ForeColor = Color.FromArgb(0, 128, 0); // Green
scintilla.Styles[Style.Cpp.CommentLine].ForeColor = Color.FromArgb(0, 128, 0); // Green
scintilla.Styles[Style.Cpp.CommentLineDoc].ForeColor = Color.FromArgb(128, 128, 128); // Gray
scintilla.Styles[Style.Cpp.Number].ForeColor = Color.Olive;
scintilla.Styles[Style.Cpp.Word].ForeColor = Color.Blue;
scintilla.Styles[Style.Cpp.Word2].ForeColor = Color.Blue;
scintilla.Styles[Style.Cpp.String].ForeColor = Color.FromArgb(163, 21, 21); // Red
scintilla.Styles[Style.Cpp.Character].ForeColor = Color.FromArgb(163, 21, 21); // Red
scintilla.Styles[Style.Cpp.Verbatim].ForeColor = Color.FromArgb(163, 21, 21); // Red
scintilla.Styles[Style.Cpp.StringEol].BackColor = Color.Pink;
scintilla.Styles[Style.Cpp.Operator].ForeColor = Color.Purple;
scintilla.Styles[Style.Cpp.Preprocessor].ForeColor = Color.Maroon;
scintilla.Lexer = Lexer.Cpp;
if (true)
{
BackColor = Color.FromArgb(0, 0, 0);
this.progressBar.BackColor = BackColor;
scintilla.Styles[Style.Default].ForeColor = Color.Silver;
scintilla.Styles[Style.Default].BackColor = Color.FromArgb(30, 30, 30);
scintilla.CaretForeColor = Color.Silver;
scintilla.SetSelectionBackColor(true, Color.FromArgb(50, 80, 140));
scintilla.StyleClearAll();
scintilla.Styles[Style.IndentGuide].BackColor = Color.FromArgb(50, 50, 50);
scintilla.Styles[Style.IndentGuide].ForeColor = Color.FromArgb(50, 50, 50);
// Configure the CPP (C#) lexer styles
scintilla.Styles[Style.Cpp.Default].ForeColor = Color.Silver;
scintilla.Styles[Style.Cpp.Comment].ForeColor = Color.FromArgb(0, 128, 0); // Green
scintilla.Styles[Style.Cpp.CommentLine].ForeColor = Color.FromArgb(0, 128, 0); // Green
scintilla.Styles[Style.Cpp.CommentLineDoc].ForeColor = Color.FromArgb(128, 128, 128); // Gray
scintilla.Styles[Style.Cpp.Number].ForeColor = Color.Olive;
scintilla.Styles[Style.Cpp.Word].ForeColor = Color.CornflowerBlue;
scintilla.Styles[Style.Cpp.Word2].ForeColor = Color.CornflowerBlue;
scintilla.Styles[Style.Cpp.String].ForeColor = Color.FromArgb(163, 21, 21); // Red
scintilla.Styles[Style.Cpp.Character].ForeColor = Color.FromArgb(163, 21, 21); // Red
scintilla.Styles[Style.Cpp.Verbatim].ForeColor = Color.FromArgb(163, 21, 21); // Red
scintilla.Styles[Style.Cpp.StringEol].BackColor = Color.Pink;
scintilla.Styles[Style.Cpp.Operator].ForeColor = Color.Purple;
scintilla.Styles[Style.Cpp.Preprocessor].ForeColor = Color.Maroon;
scintilla.Lexer = Lexer.Cpp;
}
//scintilla.Margins[1].Width = 0;
scintilla.Margins[1].Type = MarginType.BackColor;
//scintilla.Margins[0].Width = 16;
}