Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ribbon labelControl GetSuperTip doesn't work

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

like image 595
Alain Avatar asked Jul 28 '14 17:07

Alain


1 Answers

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

like image 180
Alain Avatar answered Oct 09 '22 01:10

Alain