It is currently Thu Jun 07, 2018 9:04 pm

All times are UTC - 8 hours [ DST ]


Forum rules


Please, keep discussions on topic and in the right forum. The start menu topics go into the Classic Start Menu forum, etc. This makes it easier for people to locate topics they are looking for.
If you get a satisfactory response to your question, please mark the topic as "solved". Click the green √ button in the bottom-right of the post.



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri Jan 25, 2013 7:21 pm 
Offline

Joined: Fri Jan 25, 2013 7:13 pm
Posts: 2
--- 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.


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 25, 2013 7:42 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 02, 2013 11:38 pm
Posts: 5331
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group, Almsamim WYSIWYG Classic Shell © 2010-2016, Ivo Beltchev.
All right reserved.