Whenever I would like an existing toolbar button to have a custom icon, I manually recreate and script that button on a User Button. This is quite tedious, especially if a button has a lot of functions and features (and it also is not future-proof would something change or be added to the original button in an update).
I would love for there to be a way to change the icon of a toolbar button to any custom or other internal icon, much like as is the case for User Buttons.
Or a way to easily trigger (or copy over/duplicate) an existing button's functionality into a User Button script.
Or, alternatively, having access to the original icons (or icon sprite), so that those could be edited manually.
Custom Toolbar Icons
-
avivariba
- Posts: 87
- Joined: 05 Mar 2023 07:38
- Location: Win11@125% (second monitor@100%)
Custom Toolbar Icons
Last edited by avivariba on 24 Jun 2023 20:05, edited 1 time in total.
-
jupe
- Posts: 3462
- Joined: 20 Oct 2017 21:14
- Location: Win10 22H2 120dpi
Re: Custom Toolbar Icons
This is all already possible, lookup patchimage in the scripting help.
-
avivariba
- Posts: 87
- Joined: 05 Mar 2023 07:38
- Location: Win11@125% (second monitor@100%)
Re: Custom Toolbar Icons
And here am I thinking I went through the entire Help and didn't find any such thing.
Thanks!!
Just in case, does there happen to be any way to extract/save internal icons (so that those could be used either for this or elsewhere)?
Feel free to change this topic to 'Tips & Tricks, Questions & Answers'. Seems that I can't do that myself.
-
Onlineeil
- Posts: 1875
- Joined: 13 Jan 2011 19:44
Re: Custom Toolbar Icons
Why extract when you can assign internal icons to any custom created button. Add any user button(say empty one), right click on it and select Customize Toolbar, you'll see names in [brackets] = that's the name of icon of that button. Now state one that you want in icon field of your custom created button, adding : sign at start, like= :go or :ghost.
Win 7 SP1 x64 100% 1366x768|1900x1080
-
avivariba
- Posts: 87
- Joined: 05 Mar 2023 07:38
- Location: Win11@125% (second monitor@100%)
-
jupe
- Posts: 3462
- Joined: 20 Oct 2017 21:14
- Location: Win10 22H2 120dpi
Re: Custom Toolbar Icons
For internal icons you can manually extract them from the exe, and make them individual external images, here is an old image map already on the forum if it helps, you'd need to cut it up. Not sure if Don would want you using them "elsewhere" though.

-
avivariba
- Posts: 87
- Joined: 05 Mar 2023 07:38
- Location: Win11@125% (second monitor@100%)
Re: Custom Toolbar Icons
Fair!
One big problem I'm running into now is that PatchImagesPath/patchimage doesn't seem to work with different states, for example for the Folder View Settings (fvs). It shows only when active but not enabled.
How does one include different states (inactve, enabled)? I see it are 3 different icons in the image map, but I can't find the icon codes for those versions.
-
jupe
- Posts: 3462
- Joined: 20 Oct 2017 21:14
- Location: Win10 22H2 120dpi
Re: Custom Toolbar Icons
Yeah the different states can be tricky to find, you need to forum research, anyway for your example the 3 states of fvs are fvs, fvsd, fvsp.
>>>>>> Moved topic to T&T, Q&A-
avivariba
- Posts: 87
- Joined: 05 Mar 2023 07:38
- Location: Win11@125% (second monitor@100%)
Re: Custom Toolbar Icons
Perfect! Couldn't find it from the forum search but found it via Google (just for if someone else needs it too): XYplorer Icon Resources
XYplorer Beta Club