共用方式為


RibbonLabel 類別 (2007 系統)

更新:2007 年 11 月

表示 RibbonGroupRibbonBox 上的標籤 (Label)。

命名空間:  Microsoft.Office.Tools.Ribbon
組件:  Microsoft.Office.Tools.Common.v9.0 (在 Microsoft.Office.Tools.Common.v9.0.dll 中)

語法

<ToolboxBitmapAttribute(GetType(RibbonLabel), "RibbonLabel.bmp")> _
Public NotInheritable Class RibbonLabel _
    Inherits RibbonControl

Dim instance As RibbonLabel
[ToolboxBitmapAttribute(typeof(RibbonLabel), "RibbonLabel.bmp")]
public sealed class RibbonLabel : RibbonControl

備註

當您將 [Label] 從 [工具箱] 的 [Office 功能區控制項] 索引標籤拖曳到 [功能區設計工具] 時,Visual Studio Tools for Office 就會為您建立這個類別的執行個體。

若要在執行階段將標籤加入至群組,請建立新的 RibbonLabel 物件,然後將這個物件加入至 RibbonGroupItems 集合或 RibbonBoxItems 集合。您只能在功能區載入之前這麼做。如需詳細資訊,請參閱功能區物件模型概觀

繼承階層架構

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

執行緒安全

這個型別的任何 Public static (在 Visual Basic 中為 Shared) 成員都具備執行緒安全。並非所有的執行個體成員都是安全執行緒。

請參閱

參考

RibbonLabel 成員

Microsoft.Office.Tools.Ribbon 命名空間

其他資源

功能區概觀

功能區設計工具

功能區物件模型概觀

HOW TO:開始自訂功能區