I have a problem with my custom XML Ribbon,
The callback “onAction”, “getImage” and “getEnabled” work perfectly but getScreentip and getSupertip don’t work.
XML :
<?xml version="1.0" encoding="UTF-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
<ribbon startFromScratch="true">
<qat>
<sharedControls>
<button id="Flag_fr-FR"
onAction="OnActionCallback"
getScreentip="GetScreentip"
getSupertip="GetSupertip"
getImage="GetImage"/>
<button id="Flag_en-EN"
onAction="OnActionCallback"
getScreentip="GetScreentip"
getSupertip="GetSupertip"
getImage="GetImage"/>
<separator id="Sep1" insertAfterQ="FlagEn"/>
<button id="Refresh"
insertAfterQ="Sep1"
getScreentip="GetScreentip"
getSupertip="GetSupertip"
onAction="OnActionCallback"
getImage="GetImage"/>
<separator id="Sep2" insertAfterQ="Refresh"/>
<button id="Search"
insertAfterQ="Sep2"
getScreentip="GetScreentip"
getSupertip="GetSupertip"
onAction="OnActionCallback"
getImage="GetImage"/>
<button id="OnScreenKeyboard" insertAfterQ="Search"
getScreentip="GetScreentip"
getSupertip="GetSupertip"
onAction="OnActionCallback"
getImage="GetImage"/>
<button id="Logout" insertAfterQ="OSK"
getScreentip="GetScreentip"
getSupertip="GetSupertip"
onAction="OnActionCallback"
getEnabled="GetEnabled"
getImage="GetImage"/>
</sharedControls>
</qat>
</ribbon>
</customUI>
Code-behind :
public String GetScreetip(Office.IRibbonControl control)
{
return ("Test...");
}
public String GetSupertip(Office.IRibbonControl control)
{
return ("Test");
}
First, you have mistyped the handler name, in the xml you wrote
getScreentip="GetScreentip"but in the code you wroteGetScreetipand missed thenSecond, for some reason Office ignore the char combination
...so it will only displayTestOther than this, everything seems fine.
Example:
Ribbon.xml
Ribbon.cs