Guillaume Aimetti
Posts: 2
Joined: 2007-04-18
|
Hey,
I am writing a COM add-in for Word which implements my own toolbars. On my (developer) PC the toolbar button states update automatically after exiting the method.
However, on the testing machine the state of the button changes but visually it does not. i.e. a method causes the toolbar to become disabled but the buttons appear, visually, to be enabled but its actual state is disabled. The buttons will refresh/update themselves after I do something with Word e.g. minimize and then maximize!!!
I have tried a ScreenRefresh method of the application object. Is there any other way of forcing an update on Word?
Cheers
Guy
|
|
Sergey Grischenko
Add-in Express team
Posts: 7235
Joined: 2004-07-05
|
Hi Guillaume.
Please try the following workaround to refresh the state of Office controls:
.....
button.Width++; button.Width--;
.....
P.S. Note that we take up your forum requests in the order we receive them. Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found. |
|
Guillaume Aimetti
Posts: 2
Joined: 2007-04-18
|
Hi Sergey,
I tried your workaround but it did not work. I did find a solution though:
if(commandBar.Visible == true)
{
commandBar.Visible = false;
commandBar.Visible = true;
}
Thanks for your help,
Guillaume |
|