• Login
Community
  • Login

Customize Toolbar - New Version 4.1

Scheduled Pinned Locked Moved Notepad++ & Plugin Development
45 Posts 19 Posters 62.7k 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.
  • A
    andrecool-68 @Meta Chuh
    last edited by Jun 4, 2019, 11:30 AM

    @Meta-Chuh
    I found this solution, and it works … but as always I want to simplify the solution … and not complicate it))
    https://github.com/notepad-plus-plus/notepad-plus-plus/issues/3526#issuecomment-355098777

    D A 2 Replies Last reply Jun 4, 2019, 11:42 AM Reply Quote 1
    • D
      dinkumoil @andrecool-68
      last edited by Jun 4, 2019, 11:42 AM

      @andrecool-68

      @Meta-Chuh said:

      only menu items can be selected, but not items in a settings window.

      That’s exactly the meaning of point 3. in my list above:

      four menu strings and an optional .bmp icon file name

      Please note: It says “four menu strings”, so the nesting depth of suitable menu entries can only be 4.

      A 1 Reply Last reply Jun 4, 2019, 12:36 PM Reply Quote 2
      • A
        andrecool-68 @dinkumoil
        last edited by Jun 4, 2019, 12:36 PM

        @dinkumoil You mean that I got five lines … and because of this all the problems?

        D 1 Reply Last reply Jun 4, 2019, 1:47 PM Reply Quote 0
        • A
          Alan Kilborn @andrecool-68
          last edited by Jun 4, 2019, 12:40 PM

          @andrecool-68 said:

          I found this solution, and it works

          Also can do it via Pythonscript:

          notepad.showDocSwitcher(boolean)

          A 1 Reply Last reply Jun 4, 2019, 6:55 PM Reply Quote 2
          • D
            dinkumoil @andrecool-68
            last edited by dinkumoil Jun 4, 2019, 1:54 PM Jun 4, 2019, 1:47 PM

            @andrecool-68 said:

            @dinkumoil You mean that I got five lines … and because of this all the problems?

            No, the cause of your problem was that you tried to toggle settings in the preferences dialog. That’s not the intended use case of the Customize Toolbar plugin.

            Mentioning the 4 menu strings was meant to be as a hint that you maybe should read the specs of the plugin more thoroughly before further experiments.

            BTW: Your first screenshot concerning the issue showed three hammer icons, the default symbol for not assignable icons (e.g. icon file not found or wrong icon file format).

            1 Reply Last reply Reply Quote 2
            • A
              andrecool-68 @Alan Kilborn
              last edited by Jun 4, 2019, 6:55 PM

              @Alan-Kilborn Why not show how to do it?

              A 1 Reply Last reply Jun 4, 2019, 7:06 PM Reply Quote 0
              • A
                Alan Kilborn @andrecool-68
                last edited by Jun 4, 2019, 7:06 PM

                @andrecool-68

                Hmmmm…

                Install Pythonscript plugin
                Create new script, call it ShowDocSwitcher.py
                In body of script, put notepad.showDocSwitcher(True)
                Save script
                To run script, go to Plugins > Pythonscript > Scripts and select ShowDocSwitcher
                DOC SWITCHER WINDOW IS SHOWN
                Optional: Create shortcut or toolbar button for script

                Create another new script, call it HideDocSwitcher.py
                In body of script, put notepad.showDocSwitcher(False)
                Save script
                To run script, go to Plugins > Pythonscript > Scripts and select HideDocSwitcher
                DOC SWITCHER WINDOW IS HIDDEN
                Optional: Create shortcut or toolbar button for script

                :^P

                1 Reply Last reply Reply Quote 2
                • M
                  MAPJe71
                  last edited by MAPJe71 Jun 4, 2019, 9:40 PM Jun 4, 2019, 9:38 PM

                  I’m using the LuaScript plugin to toggle the Doc Switcher:

                  1. add the following lines to startup.lua:
                  npp.AddShortcut("Toggle Doc Switcher", "", function()
                      npp:ShowDocSwitcher( not npp:IsDocSwitcherShown() )
                  end)
                  
                  1. create a DocSwitcher image (i.e. Toolbar-DocSwitcher.bmp) for the toolbar and put it in the same directory as CustomizeToolbar.btn.
                  2. add the following line to CustomizeToolbar.btn:
                  Plugins,LuaScript,Toggle Doc Switcher,,Toolbar-DocSwitcher.bmp
                  
                  1. restart Notepad++
                  2. show or hide the Doc Switcher by clicking one toolbar button

                  et Voila

                  A 1 Reply Last reply Jun 4, 2019, 9:45 PM Reply Quote 3
                  • A
                    andrecool-68 @MAPJe71
                    last edited by Jun 4, 2019, 9:45 PM

                    @MAPJe71 It works!
                    https://github.com/notepad-plus-plus/notepad-plus-plus/issues/3526#issuecomment-355098777
                    But … it should be a standard option in the view menu … or do you disagree?

                    1 Reply Last reply Reply Quote 2
                    • M
                      MAPJe71
                      last edited by Jun 4, 2019, 9:53 PM

                      OK, the GitHub link @andrecool-68 provided already pointed to a description of how I did it.
                      Did not remember that.
                      What can I say: “Now also available for Notepad++ 64 bit!” :-D

                      @andrecool-68 I agree, same toolbar button functionality as the build-in Function List toolbar button i.e. indicating active/inactive by changing the button background color.

                      1 Reply Last reply Reply Quote 3
                      45 out of 45
                      • First post
                        45/45
                        Last post
                      The Community of users of the Notepad++ text editor.
                      Powered by NodeBB | Contributors