Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Setting text color via a .NET plugin

    Plugin Development
    plugin text colour udl
    2
    2
    1512
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • shravan2x
      shravan2x last edited by

      I’ve been trying to get proper coloring for .log files set up, but since UDL does not support regexes (Like why would someone think this is a good idea???), I decided to write my own plugin merely to color text the way I want it to.

      I have many years of experience with .NET and was able to get the NppManagedPluginDemo to work after some tinkering (the project is designed to work with VS2015, not VS2017). Now I’m looking for just some examples or documentation on coloring text from plugins.

      Any pointers?

      Claudia Frank 1 Reply Last reply Reply Quote 0
      • Claudia Frank
        Claudia Frank @shravan2x last edited by Claudia Frank

        @shravan2x

        normally, style changes will be done by the lexer assigned, so make sure that your
        files do not get styled by an internal lexer as well, otherwise you are in trouble as there
        is no safe way to determine which lexer (yours or the internal one) gets called last and therefore
        does the styling one sees. See here for the API description. Be aware that npp uses scintilla 3.5.6, so, not all api calls are available.

        For a starting point, I posted here an example how such an script/prog could look like.

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright © 2014 NodeBB Forums | Contributors