本文整理匯總了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;
}