winform中RichTextBox控件设置关键字颜色
本文是针对RichTextBox控件进行了改进,改进后的RichTextBox控件将支持自定义关键字颜色, 就跟编辑器一样,是不是感觉很美好?在窗体Load事件添加如下测试代码 private void MainForm_Load(object sender, EventArgs e)
{
// Add the keywords to the list.
m_syntaxRichTextBox.Settings.Keywords.Add("function");
m_syntaxRichTextBox.Settings.Keywords.Add("if");
m_syntaxRichTextBox.Settings.Keywords.Add("then");
m_syntaxRichTextBox.Settings.Keywords.Add("else");
m_syntaxRichTextBox.Settings....
查看全文
posted @ 2016-09-22 13:51:42