One toolbar button won't stay at new location
-
I fully customize my toolbar, and my buttons have always stayed in the location I move them to in the toolbar. About half of the buttons are standard NPP buttons, and the rest are scripts, etc. I defined in CustomizeToolbar.btn.
Today, however, I created a Python script to add the selected numbers on the page that uses the “Python Script” plugin. The script works correctly from the button, but the button always shows up at the right end of the toolbar when I re-open NPP. It will not persist at the location I move it to.
Here’s the CustomizeToolbar.btn definition in case it helps:
Plugins,Python Script,Add,add.bmpAny thoughts as to why after all these years one button won’t stay in the right location?
-
I forgot to mention that I customize my toolbar with the “Customize Toolbar” plugin.
-
I just tried what appears to be a better ChatGPT prompt and got something back that might be useful. If true, I’m going to try one of the suggested workarounds.
The PythonScript plugin dynamically adds its buttons after Notepad++ has initialized, and unfortunately, Toolbar position for PythonScript buttons is not saved by Notepad++'s layout system.
-
The problem is solved.
In the Python Script Configuration dialog there’s a setting called “Initialisation”. I had it set to ATSTARTUP, because I originally thought I needed it to run another Python script that sets up my editor. (That setting turned out to be in Npp Exec’s “Execute this script when Notepad++ starts”.)
Changing “Initialisation” it to LAZY fixed the toolbar issue.
-
No it’s not. The problem is back. Something made it work for one restart, then it broke again. I’m still looking for a fix/workaround.