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!
-
@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]?
-
@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??
-
@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. -
@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.