Search code examples
c#vstoribbonoffice-addins

VSTO getScreentip can only appear once


Working on a VSTO Add-In and use the getScreentip callback. I observe that if 2 buttons from the ribbon use this call back (even with a different function), the button is no longer displayed. I guess that it generates an error during the load of the ribbon but I am not sure how to see it. There is nothing displayed in the console.

<button id="MeetingOptionsDisabled_Cal" label="Meeting"
    image="MeetingDisabledBtn"
    size="large"
    getVisible="GetVisible"
    getScreentip="GetScreentip"
    getSupertip="GetSupertip_Cal"/>
 </group>

 <button id="MeetingOptionsDisabled_Main" label="Meeting"
    image="MeetingDisabledBtn"
    Screentip="MyTip" 
    size="large"
    getVisible="GetVisible" 
    getScreentip="GetScreentip"
    getSupertip="GetSupertip_Main"/>
 </group>

--- Code behind

public string GetSupertip_Cal(Office.IRibbonControl control)
{
  return "Test screen tip";
}
public string GetSupertip_Main(Office.IRibbonControl control)
{
  return "Test screen tip";
}

Solution

  • Thanks @chris, very helpful. I discovered that the second button had a default screentip attribut. By enabling the user interface error, I understood that attributs screentip and getscreentip were mutually exclusive.