Ribbon labelControl GetSuperTip不起作用
根据msdn文档 , labelControl
支持getSupertip
属性,用于在function区控件上设置工具提示。
出于某种原因,但工具提示不起作用。 一个相同的实现工作在其他控件(如button
),而不是labelControl
。 此外,其他callback,如getLabel
工作的标签,而不是getSupertip
。
任何想法有什么不对?
function区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>
function区代码
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 + ")"; } }
getLabel
为labelControl
工作的labelControl
, getSupertip
只在button
工作。
看起来这是一个微软的错误。 无论是文档列表getSupertip
作为一个属性错误,或者属性在那里,但实现没有使用它。 无论哪种方式,都无法在labelControl上获得Supertip或其他工具提示文本。
这是我在MSDN论坛上收到的回复: ribbon-labelcontrol-getsupertip-doesnt-work