|
Sanjay Pant
Posts: 12
Joined: 2019-07-01
|
Hello All,
I am having issue with show hide task pane, when there is multiple Work book open, I have 3 excel instance open and when I click on show hide button ribbon many time it hide task pane on other Workbook/excel instance I couldn't find a way to control it. adxExcelTaskPanesCollectionItem1.TaskPaneInstance doesn't seem to provide instance of current Workbook.
I have the issue Repro with the sample provide where I get show button disable on other workbook ribbon while taskpane is not visible.Regards
Sanjay |
|
Posted 08 Sep, 2019 23:35:52
|
|
Top
|
|
Andrei Smolin
Add-in Express team
Posts: 19138
Joined: 2006-05-11
|
Hello Sanjay,
What Excel build are you using? What Add-in Express build are you using?
Andrei Smolin
Add-in Express Team Leader |
|
Posted 09 Sep, 2019 04:40:08
|
|
Top
|
|
Sanjay Pant
Posts: 12
Joined: 2019-07-01
|
Hello Andrei,
I am using "Add-in Express for Office and .NET, Standard Release 9.4.4644" and office 2013Regards
Sanjay |
|
Posted 09 Sep, 2019 05:38:39
|
|
Top
|
|
Andrei Smolin
Add-in Express team
Posts: 19138
Joined: 2006-05-11
|
Hello Sanjay,
Are you saying that calling adxExcelTaskPanesCollectionItem1.TaskPaneInstance in the Click event of a Ribbon button produces a wrong pane? Do you activate books/windows while you run that code?
Andrei Smolin
Add-in Express Team Leader |
|
Posted 09 Sep, 2019 09:05:57
|
|
Top
|
|
Sanjay Pant
Posts: 12
Joined: 2019-07-01
|
Yes I have Button on Ribbon and close button on Task Pane also, yes it some time closes wrong pane.
No I did not activate or deactivate books/window from code.
Sorry for late response was stuck in other priority issues.Regards
Sanjay |
|
Posted 13 Sep, 2019 02:14:54
|
|
Top
|
|
Dmitry Kostochko
Add-in Express team
Posts: 2887
Joined: 2004-04-05
|
Hi Sanjay,
Thank you for the additional details.
Could you please send your project (or some demo project with the same behavior) to us for testing? You can find our support email address in the readme.txt file located in the Add-in Express installation folder. |
|
Posted 13 Sep, 2019 03:23:57
|
|
Top
|
|
Andrei Smolin
Add-in Express team
Posts: 19138
Joined: 2006-05-11
|
Hello Sanjay,
We've received the video and now we are studying the issue.
Andrei Smolin
Add-in Express Team Leader |
|
Posted 17 Sep, 2019 01:49:46
|
|
Top
|
|
Sanjay Pant
Posts: 12
Joined: 2019-07-01
|
Thanks Andrei,
Really appreciated.Regards
Sanjay |
|
Posted 18 Sep, 2019 01:58:46
|
|
Top
|
|
Andrei Smolin
Add-in Express team
Posts: 19138
Joined: 2006-05-11
|
Hello Sanjay,
The issue is this code line:
adxRibbonButton1.Enabled = !TaskPane.Visible;
It disables Ribbon control instances in *all* Excel windows. Office reacts to this command in the active window; when you activate the second window, Excel handles it as well.
The way out of this is writing code handling the PropertyChanging event of the Ribbon button component. In that event, you write this IF statement
if (e.PropertyType = ADXRibbonControlPropertyType.Enabled) {}
And, if the condition is true, retrieve the context object, cast it to Excel.Window, if this window contains a pane, set e.Value = true; otherwise, e.Value = false. Whatever you, whatever exceptions you get, you should release the context object since it is a COM object and you should release every COM object created by your code.
Andrei Smolin
Add-in Express Team Leader |
|
Posted 18 Sep, 2019 02:17:04
|
|
Top
|
|