我的自定义 XML 功能区有问题,回调“onAction”、“getImage”和“getEnabled”工作正常,但 getScreentip 和 getSupertip 不起作用。
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>
代码隐藏:
public String GetScreetip(Office.IRibbonControl control)
{
return ("Test...");
}
public String GetSupertip(Office.IRibbonControl control)
{
return ("Test");
}