【发布时间】:2014-01-31 11:26:08
【问题描述】:
如何通过在 c# 中编写 notepad++ 插件来为闪烁文档中的查找文本设置和删除颜色。我尝试了以下代码:
Win32.SendMessage(PluginBase.GetCurrentScintilla(), SciMsg.SCI_STYLESETBACK, 0, 0xFFFF00);
帮助我突出显示特定文本。
【问题讨论】:
标签: c# plugins notepad++ scintilla
如何通过在 c# 中编写 notepad++ 插件来为闪烁文档中的查找文本设置和删除颜色。我尝试了以下代码:
Win32.SendMessage(PluginBase.GetCurrentScintilla(), SciMsg.SCI_STYLESETBACK, 0, 0xFFFF00);
帮助我突出显示特定文本。
【问题讨论】:
标签: c# plugins notepad++ scintilla
如果你想改selection background color,那么试试:
Win32.SendMessage(PluginBase.GetCurrentScintilla(),
SciMsg.SCI_SETSELBACK, 1, 0xFFFF00);
如果你想改selection foreground color,那么试试:
Win32.SendMessage(PluginBase.GetCurrentScintilla(),
SciMsg.SCI_SETSELFORE, 1, 0xFF0000);
要重置默认颜色,请传递 0 而不是 1。
【讨论】: