Notepad ++插件-查找并突出显示文本 [英] Notepad++ plugin - find and highlight text
本文介绍了Notepad ++插件-查找并突出显示文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何通过在 c#中编写notepad ++的插件来设置和删除scintilla文档中查找文本的颜色.我尝试了以下代码:
How do I set and remove color for the find text in a scintilla document by writing plugins for notepad++ in c#. I tried the following code:
Win32.SendMessage(PluginBase.GetCurrentScintilla(), SciMsg.SCI_STYLESETBACK, 0, 0xFFFF00);
帮助我突出显示特定文本.
Help me to highlight a particular text.
推荐答案
如果要更改选择背景颜色,然后尝试:
If you want to change the selection background color, then try:
Win32.SendMessage(PluginBase.GetCurrentScintilla(),
SciMsg.SCI_SETSELBACK, 1, 0xFFFF00);
如果您要更改选择前景色,请尝试:
If you want to change the selection foreground color, then try:
Win32.SendMessage(PluginBase.GetCurrentScintilla(),
SciMsg.SCI_SETSELFORE, 1, 0xFF0000);
要重置默认颜色,请传递0
而不是1
.
To reset the default color, pass 0
instead of 1
.
这篇关于Notepad ++插件-查找并突出显示文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文