toggleButton
In the object model this is RibbonToggleButton.
A toggleButton is a clickable item that toggles between being pressed and not pressed.
There is a Click event that is raised when the user clicks the togglebutton
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon startFromScratch="true">
<tabs>
<tab id="CustomTab" label="My Tab">
<group id="Group1" label="Group 1">
<toggleButton id="MyToggleButton1"
label="Toggle with text"
size="normal"
onAction="ToggleButton1_OnAction"/>
<toggleButton id="MyToggleButton2"
label="Toggle with image and text"
imageMso="LeaveReader"
size="normal"
onAction="ToggleButton1_OnAction"/>
<separator id="Separator1"/>
<toggleButton id="MyToggleButton3"
label="Toggle Large"
imageMso="HappyFace"
size="large"
onAction="ToggleButton2_OnAction"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
Attributes (Properties)
description | (Description) |
enabled | "true" | "false" |
id | |
idMso | (OfficeImageID) |
idQ | |
image | |
imageMso | |
insertAfterMso | |
insertAfterQ | |
insertBeforeMso | |
insertBeforeQ | |
keytip | |
label | (Label) |
screentip | (ScreenTip) |
showImage | "true" | "false" |
showLabel | (ShowLabel) "true" | "false" |
size | (ControlSize) |
supertip | (SuperTip) |
tag | (Tag) |
visible | "true" | "false" |
(Checked) |
Callbacks
onAction | ToggleButton_OnAction |
getDescription | ToggleButton_OnGetDescription |
getEnabled | ToggleButton_OnGetEnabled |
getImage | ToggleButton_OnGetImage |
getImageMso | ToggleButton_On |
getKeytip | ToggleButton_OnGetKeytip |
getLabel | ToggleButton_OnGetLabel |
getPressed | ToggleButton_OnGetPressed |
getScreentip | ToggleButton_OnGetScreentip |
getShowImage | ToggleButton_OnGetShowImage |
getShowLabel | ToggleButton_OnGetShowLabel |
getSize | ToggleButton_On |
getSupertip | ToggleButton_OnGetSupertip |
getVisible | ToggleButton_OnGetVisible |
' VBA
Public Sub ToggleButton_OnAction( _
ByRef control As Office.IRibbonControl, _
ByRef isPressed As Boolean)
End Sub
' C# Equivalent
public void ToggleButton_OnAction(
Microsoft.Office.Core.IRibbonControl control,
bool pressed)
{
}
' VBA
Public Sub ToggleButton_OnGetDescription( _
ByRef control As Office.IRibbonControl, _
ByRef ReturnedValue As Variant)
End Sub
' VBA
Public Sub ToggleButton_OnGetEnabled( _
ByRef control As Office.IRibbonControl, _
ByRef ReturnedValue As Variant)
End Sub
' VBA
Public Sub ToggleButton_OnGetImage( _
ByRef control As Office.IRibbonControl, _
ByRef ReturnedValue As Variant)
End Sub
' VBA
Public Sub ToggleButton_OnGetKeytip( _
ByRef control As Office.IRibbonControl, _
ByRef ReturnedValue As Variant)
End Sub
' VBA
Public Sub ToggleButton_OnGetLabel( _
ByRef control As Office.IRibbonControl, _
ByRef ReturnedValue As Variant)
End Sub
' VBA
Public Sub ToggleButton_OnGetPressed( _
ByRef control As Office.IRibbonControl, _
ByRef ReturnedValue As Variant)
End Sub
' VBA
Public Sub ToggleButton_OnGetScreentip( _
ByRef control As Office.IRibbonControl, _
ByRef ReturnedValue As Variant)
End Sub
' VBA
Public Sub ToggleButton_OnGetShowImage( _
ByRef control As Office.IRibbonControl, _
ByRef ReturnedValue As Variant)
End Sub
' VBA
Public Sub ToggleButton_OnGetShowLabel( _
ByRef control As Office.IRibbonControl, _
ByRef ReturnedValue As Variant)
End Sub
' VBA
Public Sub ToggleButton_OnGetSupertip( _
ByRef control As Office.IRibbonControl, _
ByRef ReturnedValue As Variant)
End Sub
' VBA
Public Sub ToggleButton_OnGetVisible( _
ByRef control As Office.IRibbonControl, _
ByRef ReturnedValue As Variant)
End Sub
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext