For some obscure reasons would like to change the icon for a built-in TB button. But since the Context menu exhibits no Edit function it seems impossible.
But that said, do you of the XY cognoscenti know of a path by which this can be accomplished?
Icon change for a built-in TB button?
-
aurumdigitus
- Posts: 1075
- Joined: 30 May 2008 21:02
- Location: Lake Erie
-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
Re: Icon change for a built-in TB button?
You could use a resource "hacker" to attempt to replace the icon stored in XYplorer.exe, but I definitely do NOT recommend this.
You could replace the built-in button with your own custom version. I just posted an example of this for another user.
You could do one better than that example and just call the original button's actions using the Button() SC, but it's difficult to get a true replacement if the button has a dropdown arrow and it's not extremely clear how to immediately show the context menu. The latter can be done by making the right-click script something like:However in doing this you make it difficult to then edit that button - though there exists another script for that. You might be able to handle the former by jumping through some hoops and using Get('Trigger'), but I haven't experimented with this.
If you don't mind my asking which button are you trying to change?
You could replace the built-in button with your own custom version. I just posted an example of this for another user.
You could do one better than that example and just call the original button's actions using the Button() SC, but it's difficult to get a true replacement if the button has a dropdown arrow and it's not extremely clear how to immediately show the context menu. The latter can be done by making the right-click script something like:
Code: Select all
"_Initialize" Button('visualfilter', 2);If you don't mind my asking which button are you trying to change?
-
Nighted
- Posts: 463
- Joined: 21 Jan 2007 01:58
- Location: Gitmo Nation North, Win 7/10/Linux/(x64)
Re: Icon change for a built-in TB button?
XY uses a PNG to store its icons. This is difficult to replace with resource hacker alone.
I want XY to serve soft ice cream. Please Don, make XY serve soft ice cream.
-
aurumdigitus
- Posts: 1075
- Joined: 30 May 2008 21:02
- Location: Lake Erie
Re: Icon change for a built-in TB button?
It is a circuitous little tale. Very much liked the Expandable drive button script by serendipity. Only later came to realize it did not display the two optical drives on the machine. Pondering the situation remembered reading Don's suggestion some place to just use the Computer button. That does the job but wanted the icon to show main purpose of drives per se not the computer.TheQwerty wrote:If you don't mind my asking which button are you trying to change?
So using you code suggestion modified to:
in a CTB with :drives for the icon all is well."_Initialize" Button('myco', 2);
Thank you for again solving the problem.
XYplorer Beta Club