03-26-2008 06:52 AM - edited 03-26-2008 11:21 AM
btnSetup = (CommandBarButton)ConverTecToolBar.ControlCollection;
btnSetup.Icon = ActCRMIntegrator.Properties.Resources.Rel;
ActApp.Explorer.CommandBarCollection[COMMANDBAR_NAME].ControlCollection.Icon = ActCRMIntegrator.Properties.Resources.Rel;
Both of ways did not work and the icon on the button did not change. Am I doing something wrong? or is it a bug? or limitation? I appreciate someone would show me somehow to change an icon on a button please.
Please note that the Icon I'm using is a 19X19 and/or 16X16 colored icon. if there are limitation on the icon size, please let me know.
In addition I have tried to change IsVisible property of a CommandBarButton object, and it worked one way! hide the button works (IsVisible=false) but showing it again is not possible (IsVisible=true), unless I hide and show the whole CommandBar object by setting (IsVisible) to false then to true again!! And ofcourse that is not a solution to the problem and there has to be a way to hide and show buttons on the fly without hide and show techinique!