Community
    • Login

    Toolbar Icon not appearing

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    5 Posts 3 Posters 515 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.
    • Thomas KnoefelT
      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
        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
          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
            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
              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
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors