8

According to the msdn documentation, a labelControl supports the getSupertip property for setting a tooltip on the ribbon control.

For some reason though, the tooltip isn't working. An identical implementation works on other controls (like button), but not labelControl. Furthermore, other callbacks such as getLabel work for the label, just not getSupertip.

Any idea what's wrong?

Ribbon 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>

Ribbon Code

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 + ")";
        }
    }

Image of getLabel working for labelControl and getSupertip working on button only. labelControl label working and tooltip working on button

Alain
  • 26,663
  • 20
  • 114
  • 184
  • 2
    For future viewers with the same problem, consider that: "The `getSupertip` and `supertip` attributes are mutually exclusive. If neither attribute is specified, no `supertip` for this control should be shown." (from the documentation). This, however, is not the issue in this case. – Alain Jul 28 '14 at 18:21
  • See also http://msdn.microsoft.com/en-us/library/aa338199%28v=office.12%29.aspx#OfficeCustomizingRibbonUIforDevelopers2_Detailed - a document that discusses all the controls and their shared properties. – Alain Jul 28 '14 at 18:57

1 Answers1

6

It looks like this is a Microsoft bug. Either the documentation lists getSupertip as a property by mistake, or the property is there but the implementation makes no use of it. Either way, there's no way to get a Supertip or other tooltip text on a labelControl.

This is the response I've received on the MSDN forums: ribbon-labelcontrol-getsupertip-doesnt-work

Alain
  • 26,663
  • 20
  • 114
  • 184