|
本帖最后由 loquat 于 2013-7-26 21:51 编辑
没明白为什么?为什么不能实现显示和隐藏呢。- <?xml version="1.0" encoding="utf-8" ?>
- <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
- onLoad="R_OnLoad" >
- <ribbon startFromScratch="false">
- <tabs>
- <tab id="tab1" label="Hide Built-In Tab Demo" >
- <group id="group1" label="Demo Group">
- <toggleButton id="togglebutton1"
- imageMso="AcceptInvitation"
- label="Hide Home Tab"
- onAction="flipHomeTab"
- getPressed="buttonPressed" />
- </group>
- </tab>
- <tab idMso="TabHome" getVisible="showHomeTab" />
- </tabs>
- </ribbon>
- </customUI>
-
复制代码- Private myRibbon As IRibbonUI
- Private showHomeTabBool As Boolean
- showHomeTabBool = True
- Public Sub R_OnLoad(ribbon As IRibbonUI)
- myRibbon = ribbon
- End Sub
- Public Sub flipHomeTab(ByVal control As IRibbonControl, ByVal flip As Boolean)
- showHomeTabBool = flip
- myRibbon.Invalidate
- End Sub
- Public Function buttonPressed(ByVal control As IRibbonControl) As Boolean
- buttonPressed = showHomeTabBool
- End Function
- Public Function showHomeTab(ByVal control As IRibbonControl) As Boolean
- showHomeTab = Not showHomeTabBool
- End Function
复制代码 |
|