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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With