RibbonLabel Class (2007 System)

Represents a label on a RibbonGroup or RibbonBox.

Namespace:  Microsoft.Office.Tools.Ribbon
Assembly:  Microsoft.Office.Tools.Common.v9.0 (in Microsoft.Office.Tools.Common.v9.0.dll)

Syntax

'Declaration
<ToolboxBitmapAttribute(GetType(RibbonLabel), "RibbonLabel.bmp")> _
Public NotInheritable Class RibbonLabel _
    Inherits RibbonControl
'Usage
Dim instance As RibbonLabel
[ToolboxBitmapAttribute(typeof(RibbonLabel), "RibbonLabel.bmp")]
public sealed class RibbonLabel : RibbonControl
[ToolboxBitmapAttribute(typeof(RibbonLabel), L"RibbonLabel.bmp")]
public ref class RibbonLabel sealed : public RibbonControl
public final class RibbonLabel extends RibbonControl

Remarks

Visual Studio Tools for Office creates an instance of this class for you when you drag a Label from the Office Ribbon Controls tab of the Toolbox onto the Ribbon Designer.

To add a label to a group at run time, create a new RibbonLabel object, and then add this object to the Items collection of a RibbonGroup or the Items collection of a RibbonBox. You can do this only before the Ribbon is loaded. For more information, see Ribbon Object Model Overview.

Inheritance Hierarchy

System.Object
  System.MarshalByRefObject
    System.ComponentModel.Component
      Microsoft.Office.Tools.Ribbon.RibbonComponent
        Microsoft.Office.Tools.Ribbon.RibbonControl
          Microsoft.Office.Tools.Ribbon.RibbonLabel

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

RibbonLabel Members

Microsoft.Office.Tools.Ribbon Namespace

Other Resources

Ribbon Overview

Ribbon Designer

Ribbon Object Model Overview

How to: Get Started Customizing the Ribbon