Task pane events

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

Task pane events
 
Nicholas Hebb


Guest


I want to persist UI state between uses of a task pane. If the users clicks the task pane close button, I can save the state in the ADXCloseButtonClick event. But if the users closes Excel, I can't determine which event to use. I tried overriding OnFormClosing, but that had no effect. What do you suggest?
Posted 11 Dec, 2011 12:51:01 Top
Eugene Astafiev


Guest


Hi Nicholas,

Please consider using the Deactivate event of the AddinExpress.XL.ADXExcelTaskPane class instead.
Posted 12 Dec, 2011 02:55:59 Top
Nicholas Hebb


Guest


Thanks, that fixed it. I had assumed deactivate would be triggered every time the focus switched from the task pane to the worksheet, but now that I've tested it I see that it only gets triggered when the task pane is minimized, closed via the close button, or when Excel shuts down.
Posted 12 Dec, 2011 04:37:05 Top
Eugene Astafiev


Guest


You are welcome, Nicholas! ;-)

FYI The description for the Deactivate event states:

Occurs when the form is moved from the top of the set of ADXForm instances in the current layout.
Posted 12 Dec, 2011 05:09:13 Top
Nicholas Hebb


Guest


OK, thanks for pointing that out. I hunted around the help file and only looked in the ADXExcelTaskPane Events section. I see now that it's located in the ADXForm Events section.
Posted 12 Dec, 2011 06:36:19 Top
Eugene Astafiev


Guest


Hi Nicholas,

Good luck with your add-in project!:-)
Posted 12 Dec, 2011 07:01:58 Top