Customize Toolbar - New Version 4.1
-
@dinkumoil
I have three buttons, two of them work:Plugins,Visual Studio Line Copy,CopyAllowLine,,custom-icon-1.bmp Plugins,Visual Studio Line Copy,CutAllowLine,,custom-icon-1.bmp
And one button does not work:
Settings,Preferences...,General,Document List Panel,Show,,custom-icon-1.bmp
-
i don’t think you can toggle doc switcher with the customize toolbar plugin.
only menu items can be selected, but not items in a settings window.it would be cool though, to show/hide doc switcher quicker than to go to the settings every time.
-
@Meta-Chuh Of course it would be more convenient, this option should also be present in the “view menu”
-
@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 -
@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.
-
@dinkumoil You mean that I got five lines … and because of this all the problems?
-
@andrecool-68 said:
I found this solution, and it works
Also can do it via Pythonscript:
notepad.showDocSwitcher(boolean)
-
@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).
-
@Alan-Kilborn Why not show how to do it?
-
Hmmmm…
Install Pythonscript plugin
Create new script, call itShowDocSwitcher.py
In body of script, putnotepad.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 scriptCreate another new script, call it
HideDocSwitcher.py
In body of script, putnotepad.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
-
I’m using the LuaScript plugin to toggle the Doc Switcher:
- add the following lines to
startup.lua
:
npp.AddShortcut("Toggle Doc Switcher", "", function() npp:ShowDocSwitcher( not npp:IsDocSwitcherShown() ) end)
- create a DocSwitcher image (i.e.
Toolbar-DocSwitcher.bmp
) for the toolbar and put it in the same directory asCustomizeToolbar.btn
. - add the following line to
CustomizeToolbar.btn
:
Plugins,LuaScript,Toggle Doc Switcher,,Toolbar-DocSwitcher.bmp
- restart Notepad++
- show or hide the Doc Switcher by clicking one toolbar button
et Voila
- add the following lines to
-
@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? -
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.