Issue with multiple TaskPanes in minimized state

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

Issue with multiple TaskPanes in minimized state
 
OliverM


Guest


When working with multiple ADXExcelTaskPane items in minimized state, the panes do not behave equally when the caption is clicked. Consider the following scenario:

- 3 different panes all lined up at the right side of the Excel window.
- Click the arrow in the right corner of any form header and transfer the region to the minimized state.
- Expand pane #1 => all fine, overlay shows up correctly at the right side of the Excel Window.
- Expand pane #2 => all fine, overlay shows up correctly at the right side of the Excel Window.
- Expand pane #3 => oops, overlay shows up at the top left corner of the Excel Window.

If I change the pane count to 4, pane #3 overlay is correct again, so I assume only the last pane is affected.
Posted 02 Jan, 2018 06:43:42 Top
Andrei Smolin


Add-in Express team


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

We can't reproduce the issue. What Excel build are you using? Is it 32bit or 64bit? Are you sure the AddinExpress.XL.2005 reference in your project points to the latest build of Add-in Express?


Andrei Smolin
Add-in Express Team Leader
Posted 04 Jan, 2018 09:59:43 Top
OliverM


Guest


Found the source of the issue. All my ADXExcelTaskPanes inherit from a TaskPaneBase class which is responsible for assigning the pane to a workbook window, handling resizing requests and other useful stuff. The base class also consumes the form activated event to set a form specific min width in order to allow, when switching from a wider pane to a smaller one, the smaller pane to show up with the correct width.
But the routine only took the ADXRegionState.Normal into account. So anytime the window was in minimized state the overlay mode started behave oddly.
Finally a simple

private void TaskPaneBase_Activated(object sender, EventArgs e)
{
   if (RegionState != ADXRegionState.Normal)return;

   // Rest of code deleted for sake of clarity

   Width = MinWidth;
            
}


did the trick.
Posted 07 Jan, 2018 10:32:13 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Thank you for letting us know.


Andrei Smolin
Add-in Express Team Leader
Posted 08 Jan, 2018 04:19:57 Top