Controls Not Refreshing When Advanced Task Pane is Hidden

Add-in Express™ Support Service
That's what is more important than anything else

Controls Not Refreshing When Advanced Task Pane is Hidden
Controls Not Refreshing When Advanced Task Pane is Hidden 
mwynn


Guest


I have created an Advanced Task Pane for Excel. I have added a user control to the task pane that contains several other controls (buttons, labels, etc.) When the user is done with the task pane, it is hidden. I then run some code to reset buttons and labels to their original/default positions. However, the next time the user opens the task pane, you actually see all of the controls resetting.

Is there anyway to force the controls to reset (and refresh/repaint) while the task pane is hidden? It looks clunky to see all of the controls refreshing when the task pane unhides.
Posted 12 Nov, 2015 06:43:14 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hello,

I suggest that you create a test Ribbon button, move the code resetting the controls on the pane to the Click event of that button, start Excel, hide the pane, click the Ribbon button and check the result.


Andrei Smolin
Add-in Express Team Leader
Posted 12 Nov, 2015 08:49:09 Top
mwynn


Guest


I have tried that now without success. Any changes that I make to existing controls on a hidden task pane are not performed until the task pane reopens. For example, I add a control to a task pane and then remove the control once the taskpane is hidden. The next time the taskpane reopens, I can see the control being removed as the taskpane becomes visible. It doesn't matter if I remove the control from a ribbon button, I still see it being removed when the taskpane is unhidden.

Thanks
Posted 12 Nov, 2015 12:09:49 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hello,

Please check if the issue is reproducible with this project: http://temp.add-in-express.com/support/MyAddin248-ShowHideFormModifyControls.zip.


Andrei Smolin
Add-in Express Team Leader
Posted 13 Nov, 2015 03:36:38 Top
mwynn


Guest


Hi Andrei,

Thank you, this is very helpful. Yes, I'm seeing the same issue. When the task pane is hidden, I click the "Change Controls" button. I then click the "Show/Hide" button, and can see the control updating the random numbers after the task pane unhides. I want the controls to be fully refreshed before the task pane is unhidden.

Thanks,
Matt
Posted 13 Nov, 2015 08:01:20 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hello Matt,

We are unable to reproduce the issue on this project. Could you please turn all other COM add-ins off? Could you also check if the issue is reproducible if that add-in opens a Windows form instead of a pane?

What version, service pack and bitness of Winodws and Office are you using?


Andrei Smolin
Add-in Express Team Leader
Posted 16 Nov, 2015 03:38:34 Top
mwynn


Guest


Hi Andrei,

I turned off all other COM add-ins and regular add-ins, and still get the issue. I have posted a 30 second video to illustrate what I'm seeing: www.finprosolutions.com/downloads/Addin_Express.mp4

You'll notice that the number re-calculate visibly, even though the button is clicked while the taskpane is hidden.

I am using Windows 8.1 64, and Office 2013 32.

Thanks,
Matt
Posted 17 Nov, 2015 11:49:47 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hello Matt,

We've reproduced the issue. At the moment, we don't have a solution. It looks like we will not be able to solve it in the code of Add-in Express. We are looking for a workaround; when I have any news on this, I'll send you a note.


Andrei Smolin
Add-in Express Team Leader
Posted 19 Nov, 2015 07:12:00 Top
mwynn


Guest


Hi Andrei,

Thank you for letting me know; thought I was going a bit crazy.
What is the source of the issue? Is it Windows or Excel version specific?
Also, has no one else noticed that changes to controls on hidden task panes do not update until they are made visible?

Thanks again,
Matt
Posted 19 Nov, 2015 08:22:20 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hello Matt,

It looks like this is specific to Excel 2013+; we will test this in previous Excel versions. It looks like Excel stores the content of the region where the pane is located. When you set the pane visible, Excel restores that region and you see the old content.


Andrei Smolin
Add-in Express Team Leader
Posted 19 Nov, 2015 09:05:56 Top