labelControl

In the object model this is RibbonLabel
A labelControl is a textual element and has no actions.
It is often used to provide header to columns of related buttons.
A label must appear in a group.

<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">
          <labelControl id="MyLabel1"
                        label="Label 1" />
          <labelControl id="MyLabel2"
                        label="Label 2" />
        </group>
        <group id="Group2" label="Group 2">
          <labelControl id="MyLabel3"
                        label="Very Long Label" />
        </group>
      </tab>
    </tabs>
  </ribbon>
</customUI>

Attributes (properties)

enabled(Enabled) "true" | "false" 
id(Id) 
idMso  
idQ  
insertAfterMso  
insertAfterQ  
insertBeforeMso  
insertBeforeQ  
keytip  
label(Label) 
screentip(ScreenTip) 
showLabel(ShowLabel) 
supertip(SuperTip) 
tag(Tag) 
visible(Visible) "true" | "false" 
 (Locked) 
 (Modifiers) 
 (GenerateMember) 
 (Name) 

Callbacks (run-time)

getEnabledLabelControl_OnGetEnabled -  
getImageLabelControl_OnGetImage -  
getKeytipLabelControl_OnGetKeyTip -  
getLabelLabelControl_OnGetLabel -  
getScreentipLabelControl_OnGetScreentip -  
getShowImageLabelControl_OnGetShowImage -  
getShowLabelLabelControl_OnGetShowLabel -  
getSupertipLabelControl_OnGetSupertip -  
getVisibleLabelControl_OnGetVisible -  


' VBA
Public Sub Label_OnGetLabel( _
   ByRef control As Office.IRibbonControl, _
   ByRef Label As Variant)

   Label = "my dynamic label"
End Sub

' C# Equivalent
string Label_OnGetLabel(
   Microsoft.Office.Core.IRibbonControl control)
{
}


© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext