功能区 labelControl GetSuperTip 不起作用

Ala*_*ain 6 c# excel vsto ribbon ms-office

根据msdn 文档,alabelControl支持getSupertip在功能区控件上设置工具提示的属性。

但出于某种原因,工具提示不起作用。相同的实现适用于其他控件(如button),但不适用于labelControl。此外,其他回调(例如为getLabel标签工作),而不是getSupertip.

知道出了什么问题吗?

功能区 XML

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
  <ribbon>
    <tabs>
      <tab id="custom" label="Custom AddIn">
        <group id="ConfigGroup" label="Configuration">
          <labelControl id="lb1" getLabel="GetLabel" getSupertip="GetSupertip" />
          <button id="bt1" label="Set Server URL" getSupertip="GetSupertip" />
          ...
        </group>
      </tab>
    </tabs>
  </ribbon>
</customUI>
Run Code Online (Sandbox Code Playgroud)

功能区代码

public class CustomRibbon : ExcelRibbon, IExcelAddIn
{
    public string GetSupertip(IRibbonControl control)
    {
        switch (control.Id)
        {
            case "lb1":
                return "The current server address is: " + API.serverURL;
            case "bt1":
                return "Click to change the server URL. (Currently: " + 
                       API.serverURL + ")";
        }
    }
Run Code Online (Sandbox Code Playgroud)

只为getLabel工作labelControlgetSupertip工作的形象button labelControl 标签工作和工具提示在按钮上工作

Ala*_*ain 6

看起来这是微软的一个错误。要么文档getSupertip错误地将其列为属性,要么该属性存在但实现没有使用它。无论哪种方式,都无法在labelControl.

这是我在 MSDN 论坛上收到的回复:ribbon-labelcontrol-getsupertip-doesnt-work