themes - 在 Notepad++ 中更改功能工具提示的背景颜色

标签 themes tooltip notepad++ color-scheme

我已经完成了以下操作,但这不是这里的问题。

How to change background color in the Notepad++ text editor?

我正在使用 Notepad++ 在python中编程并应用深黑色其中有黑色背景和白色文本颜色的主题。

键入函数时,它显示 函数语法 在具有白色背景的工具提示中 对比与黑色背景的记事本。

GIF explaining flickering effect.

我已经在 Style Configurator 中搜索过,但没有运气。

如何更改工具提示的背景颜色?

最佳答案

Notepad++ 使用 闪烁 作为其编辑器组件。 calltip 功能直接来自 scintilla。对于在 Notepad++ 的 gui 中没有直接配置选项的 scintilla 功能(calltip 样式似乎是这样的功能),您需要一个方法来 向 Scintilla 发送消息 .

一种方法(也是我所知道的唯一一种除了编写插件之外的方法)是使用 NppExec 插件 .它提供了一个 SCI_SENDMSG命令。 scintilla website提供有关每条可能消息的详细文档。对于您的用例,它说:

Call tips are small windows displaying the arguments to a function and are displayed after the user has typed the name of the function. They normally display characters using the font facename, size and character set defined by STYLE_DEFAULT. You can choose to use STYLE_CALLTIP to define the facename, size, foreground and background colours and character set with SCI_CALLTIPUSESTYLE. This also enables support for Tab characters. There is some interaction between call tips and autocompletion lists in that showing a call tip cancels any active autocompletion list, and vice versa.



因此我们需要发送 SCI_CALLTIPUSESTYLE消息和(继续在网站上阅读)我们可以使用 SCI_CALLTIPSETBACK 配置前景色和背景色和 SCI_CALLTIPSETFORE .

因此,要通过使用 NppExec 向 Scintilla 编辑器组件发送消息来设置 calltip 的颜色,您需要执行以下操作:
  • 安装 NppExec 使用 PluginManager 或来自 PluginCentral . NppExec zip 文件包含 dll 和一些子目录。安装/升级到 Notepad++ 插件目录时,注意在 plugins 目录下创建子目录 NppExec(只需将文件解压到 plugins 目录中即可)。 NppExec 目录包含文件 Scintilla.h它具有可能的消息的所有定义。
  • 店铺 这些行作为 NppExec 脚本 (Plugins -> NppExec -> Execute... ,输入以下几行并选择保存,例如作为 SetCallTipSTLye):
    // use CALLTIPSTYLE instead DEFAULT
    SCI_SENDMSG SCI_CALLTIPUSESTYLE 0
    // background to black ( 0 )
    SCI_SENDMSG SCI_CALLTIPSETBACK 0
    // foreground to white ( 0xffffff )
    SCI_SENDMSG SCI_CALLTIPSETFORE 0xffffff
    
  • 执行 脚本OK

  • 现在您的 calltip Window 应该是黑底白字,您可能希望通过更改参数来采用颜色。

    如果一切正常,那么 Plugins -> NppExec -> Advanced Options 提供选项 Notepad++ 启动时执行此脚本 在配置对话框的右上角区域。在下面选择脚本名称
    您保存了该行(例如 SetCallTipSTLye)

    唉,我一直无法找到如何配置自动完成样式。我希望它会使用与 calltip 样式相同的样式,但自动补全保持黑底白字。

    关于themes - 在 Notepad++ 中更改功能工具提示的背景颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46364241/

    相关文章:

    templates - Tumblr 使用什么模板语言?

    html - Cakephp 2.4.5 烘焙 View 中的自定义 HTML

    css hover 和 immidiatily 先例不起作用

    c# - 在 C# Windows 窗体中更改动态创建的工具提示字体的简单方法?

    html - Notepad++ 和嵌入式 Perl - 特定标记内的语法突出显示

    php - 如何自定义WordPress可视化编辑器HTML输出

    cocoa - NSToolbarItem 的屏幕位置

    comments - 在 Notepad++ 中隐藏评论

    python - 我正在尝试在 notepad++ 中设置 python,但它无法理解我的文件路径中包含空格

    Javascript 和 Wordpress : Functions. php 用于子主题更改 JS 文件上的值