Community
    • Login

    Toolbar Icon not appearing

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    5 Posts 3 Posters 1.1k Views 2 Watching
    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.
    • Thomas KnoefelT Offline
      Thomas Knoefel
      last edited by Thomas Knoefel

      I’m encountering an issue adding a toolbar icon into the Plugin. Despite following the GitHub Demo, the icon isn’t showing up.

      I’ve implemented a code block into the NPPN_TBMODIFICATION section. Icons definitions in resource.rc and resource.h are also in place. From my understanding this should be sufficiant.

      The demo works fine, but I can’t figure out what’s missing in my code. Any suggestions would be appreciated!

      CoisesC 1 Reply Last reply Reply Quote 0
      • CoisesC Offline
        Coises @Thomas Knoefel
        last edited by

        @Thomas-Knoefel said in Toolbar Icon not appearing:

        I’m encountering an issue adding a toolbar icon into the Plugin. Despite following the GitHub Demo, the icon isn’t showing up.

        I’ve implemented a code block into the NPPN_TBMODIFICATION section. Icons definitions in resource.rc and resource.h are also in place. From my understanding this should be sufficiant.

        The demo works fine, but I can’t figure out what’s missing in my code. Any suggestions would be appreciated!

        Sorry if I’m jumping in too quickly, but at first glance, funcItem[1] looks like your menu separator. Perhaps you meant funcItem[0]?

        Thomas KnoefelT 1 Reply Last reply Reply Quote 2
        • Thomas KnoefelT Offline
          Thomas Knoefel @Coises
          last edited by Thomas Knoefel

          @Coises said in Toolbar Icon not appearing:

          e, funcItem[1] looks like your menu separator. Perhaps you meant funcItem[0]?

          Wow, thanks a lot. This solved it!! But why is it working in the Demo with funcItem[1]._cmdID. I copied it 1:1. I’m not getting it??

          PeterJonesP 1 Reply Last reply Reply Quote 0
          • PeterJonesP Offline
            PeterJones @Thomas Knoefel
            last edited by

            @Thomas-Knoefel said in Toolbar Icon not appearing:

            I copied it 1:1. I’m not getting it??

            No you didn’t. You made menu entries Multi Replace, Separator, Documentation, About. The Demo had menu entries “Hello Notepad++”, “Hello (with FX)”, “—”, … – so the funcItem[1] of their array was “Hello (with FX)”, whereas the funcItem[1] of your array was your separator. The index you use in that array needs to match with the command number in your setCommand for that menu entry.

            Thomas KnoefelT 1 Reply Last reply Reply Quote 3
            • Thomas KnoefelT Offline
              Thomas Knoefel @PeterJones
              last edited by Thomas Knoefel

              @PeterJones said in Toolbar Icon not appearing:

              needs to match with the command number in your setCommand for that menu entry

              Ok, that makes now absolute sense for me. My setCommand is actually pointing to 0 to call the plugin.

              1 Reply Last reply Reply Quote 0

              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