Community
    • Login

    c# plugin, how to color highlight parts of text on each line?

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    3 Posts 3 Posters 5.3k Views
    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.
    • Bas de ReuverB Offline
      Bas de Reuver
      last edited by

      I’m working on a Notepad++ plug-in using C# to view and edit CSV data files more easily. I would like to add a feature were Notepad++ will highlight each column using different background colors for each column.

      So the color will change after a certain character (like ; or , or tab) or after fixed widths, and it uses the same sequence of colors for each line. See mockup screenshot below to see what I mean.

      npp_plugin_colors_question.png

      Is something like this possible in a C# plugin, and if so how? I couldn’t find example code of something similar to this on github.

      Michael VincentM EkopalypseE 2 Replies Last reply Reply Quote 0
      • Michael VincentM Offline
        Michael Vincent @Bas de Reuver
        last edited by

        @Bas-de-Reuver

        Have you seen / tested the CSVQuery plugin? It doesn’t do what you’re screenshot shows, instead, parses the data into a table view in a dockable. I guess that table view isn’t editable though?

        Cheers.

        1 Reply Last reply Reply Quote 1
        • EkopalypseE Offline
          Ekopalypse @Bas de Reuver
          last edited by

          @Bas-de-Reuver

          You either use styles or indicators.
          An example of how you can do this is shown here.

          1 Reply Last reply Reply Quote 1

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors