Community
    • Login

    One toolbar button won't stay at new location

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 1 Posters 1.2k Views 1 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.
    • VTGroupGitHubV Offline
      VTGroupGitHub
      last edited by

      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.bmp

      Any thoughts as to why after all these years one button won’t stay in the right location?

      1 Reply Last reply Reply Quote 0
      • VTGroupGitHubV Offline
        VTGroupGitHub
        last edited by

        I forgot to mention that I customize my toolbar with the “Customize Toolbar” plugin.

        1 Reply Last reply Reply Quote 0
        • VTGroupGitHubV Offline
          VTGroupGitHub
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • VTGroupGitHubV Offline
            VTGroupGitHub
            last edited by

            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.

            1 Reply Last reply Reply Quote 0
            • VTGroupGitHubV Offline
              VTGroupGitHub
              last edited by

              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.

              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