Classic Shell http://www.classicshell.net/forum/ |
|
How to change a custom toolbar button "Text" and "ICON". http://www.classicshell.net/forum/viewtopic.php?f=8&t=149 |
Page 1 of 1 |
Author: | CarlCzarnecki [ Fri Jan 25, 2013 7:21 pm ] |
Post subject: | How to change a custom toolbar button "Text" and "ICON". |
--- Feature Request --- Applies to: Classic Shell, Classic Explorer, Custom ToolBar Button --- Objective --- When a custom ToolBar button is clicked, I want to change the button ICON and the button Text. This is necessary to reflect the current state of the action that was performed. --- Example --- Change the button "Text". $Key = "HKEY_CURRENT_USER\Software\IvoSoft\ClassicExplorer" $ValueName = "ToolbarItems" $ValueType = "REG_MULTI_SZ" $Data = RegRead( $Key, $ValueName ) $Label1 = "TestButton.Label=OldText" $Label2 = "TestButton.Label=NewText" If StringInStr( $Data, $Label1 ) Then $Data = StringReplace( $Data, $Label1, $Label2 ) Else $Data = StringReplace( $Data, $Label2, $Label1 ) EndIf RegWrite( $Key, $ValueName, $ValueType, $Data ) The TestButton.Label does change, but I have to close the Windows Explorer then reopen it for the changes to be reflected. How do I force Classic Explorer to refresh the ToolBar (on-the-fly) under program control? Maybe I could call something in... C:\Program Files\Classic Shell\ClassicExplorer64.dll Thank You in advance. |
Author: | Ivo [ Fri Jan 25, 2013 7:42 pm ] |
Post subject: | Re: How to change a custom toolbar button "Text" and "ICON". |
Sorry, not possible. The icons are only loaded when the toolbar is created. The only thing you can do is enable or disable custom commands. Look at the end of the Settings section in the help how to force a refresh. |
Page 1 of 1 | All times are UTC - 8 hours [ DST ] |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |