Excel自定义任务窗格不显示 [英] Excel Custom Task Pane not showing

查看:1044
本文介绍了Excel自定义任务窗格不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在excel VSTO加载项中显示一个自定义任务窗格,正在构建它并显示为:

  var ctrl = new CellTask​​Pane(); 
var pane = CustomTaskPanes.Add(ctrl,Custom Sheet);
pane.DockPosition = Office.MsoCTPDockPosition.msoCTPDockPositionRight;
pane.DockPositionRestrict = Office.MsoCTPDockPositionRestrict.msoCTPDockPositionRestrictNoChange;
pane.Visible = true;

这是在 ThisAddin.cs 文件,它在我的机器上工作正常,都在Debug会话下,并且通过点击一次安装程序安装的加载项。



然而,安装add - 在同事的机器上证明是麻烦的。



加载项正在运行,上下文菜单/功能区正常工作,但窗格只是拒绝显示。 / p>

我在功能区上有一个切换按钮,可以在窗格上切换 Visible 属性,甚至点击不是强制窗格显示。



对此的任何帮助将不胜感激,Google对此无疑是无用的。



谢谢。






我应该提到 CellTask​​Pane 只是一个 UserControl 根据MSDN上的文档: http://msdn.microsoft.com/en-us /library/aa942846.aspx

解决方案

原来这不是我们直接在做的任何事情! >

安装了另一个加载项(第三方),因为某些奇怪的原因干扰了正在显示的窗格(不知道为什么或如何)。

$ b $耻辱,Excel不显示任何错误,或至少抛出一个例外。



好的。


I'm showing a custom task pane in an excel VSTO add-in, I'm building it and showing it as thus:

var ctrl = new CellTaskPane();
var pane = CustomTaskPanes.Add(ctrl, "Custom Sheet");
pane.DockPosition = Office.MsoCTPDockPosition.msoCTPDockPositionRight;
pane.DockPositionRestrict = Office.MsoCTPDockPositionRestrict.msoCTPDockPositionRestrictNoChange;
pane.Visible = true;

This is being done in the ThisAddin.cs file and it working just fine on my machine, both under a Debug session and with the add-in installed via the click-once installer.

However, installing the add-in on a colleague's machine is proving troublesome.

The add-in is functioning and the context menu / ribbon is working perfectly, but the pane just refuses to show.

I have a toggle button on the ribbon which toggles the Visible property on the pane and even clicking that isn't forcing the pane to show.

Any help on this would be greatly appreciated, Google is proving useless for this.

Thanks.


I should mention that CellTaskPane is just a UserControl as per the docs on MSDN: http://msdn.microsoft.com/en-us/library/aa942846.aspx

解决方案

Turns out it wasn't anything we were doing directly!

There was another add-in installed (third party) which for some bizarre reason was interfering with the pane being shown (no idea why or how).

Shame that Excel doesn't show any sort of error or at least throw an exception.

Ah well.

这篇关于Excel自定义任务窗格不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆