RibbonComboBox 介面

定義

表示自訂功能區上的下拉式方塊。

public interface class RibbonComboBox : IDisposable, Microsoft::Office::Tools::Ribbon::RibbonControl, System::ComponentModel::IComponent
[System.Runtime.InteropServices.Guid("97074be3-d4bb-4923-881a-7a6e225738af")]
public interface RibbonComboBox : IDisposable, Microsoft.Office.Tools.Ribbon.RibbonControl, System.ComponentModel.IComponent
[<System.Runtime.InteropServices.Guid("97074be3-d4bb-4923-881a-7a6e225738af")>]
type RibbonComboBox = interface
    interface RibbonControl
    interface RibbonComponent
    interface IComponent
    interface IDisposable
Public Interface RibbonComboBox
Implements IComponent, IDisposable, RibbonControl
屬性
實作

備註

下拉式方塊會顯示使用者文字輸入字段和下拉功能表中的選項清單。

您可以使用物件的 方法RibbonFactory,在執行時間CreateRibbonComboBox建立 RibbonComboBox

有兩種方法可以存取 RibbonFactory 物件:

  • 使用功能區類別的 Factory 屬性。 請從功能區類別中的程式碼使用此方法。

  • 使用 Globals.Factory.GetRibbonFactory 方法。 請從功能區類別外的程式碼使用此方法。

只有在功能區載入 Office 應用程式之前,才能設定此類型的某些成員。 如需設定這些屬性的詳細資訊,請參閱 功能區物件模型概觀

注意

這個介面是由 Visual Studio Tools for Office Runtime 實作, 並不能實作於您的程式碼中。 如需詳細資訊,請參閱 Visual Studio Tools for Office Runtime Overview

使用方式

本文件說明此類型的版本,其會用在目標為 .NET Framework 4 或更新版本的 Office 專案中。 在以 .NET Framework 3.5 為目標的專案中,此類型可能會有不同的成員,而為此類型提供的程式碼範例可能無法運作。 如需此類型在以 .NET Framework 3.5 為目標專案中的相關文件,請參閱下列 Visual Studio 2008 文件中的參考章節:http://go.microsoft.com/fwlink/?LinkId=160658

屬性

Enabled

取得或設定值,指出是否啟用這個 RibbonControl

(繼承來源 RibbonControl)
Id

取得字串,Microsoft Office 用來識別這個 RibbonControl 物件。

(繼承來源 RibbonControl)
Image

取得或設定顯示在這個 RibbonComboBox 上的影像。

ImageName

取得或設定您在 LoadImage 事件處理常式中,用來識別控制項影像的名稱。

Items

取得這個 RibbonComboBox 中的項目集合。

KeyTip

取得或設定這個 RibbonComboBox 的鍵盤快速鍵。

Label

取得或設定顯示在這個 RibbonComboBox 上的文字。

MaxLength

取得或設定值,指出這個 RibbonComboBox 中每個項目所允許的字元數目上限。

Name

取得或設定這個 RibbonComponent 的名稱。

(繼承來源 RibbonComponent)
OfficeImageId

取得或設定要顯示在 RibbonComboBox 上的影像 (如果想要使用內建的 Microsoft Office 圖示)。

Parent

取得 RibbonComponent,代表這個 RibbonComponent 的父代。

(繼承來源 RibbonComponent)
Ribbon

取得包含控制項階層的最上層 Ribbon 物件。

(繼承來源 RibbonComponent)
RibbonUI

取得 Microsoft Office 應用程式提供給功能區擴充性程式碼的 IRibbonUI 執行個體。

(繼承來源 RibbonComponent)
ScreenTip

取得或設定當使用者將指標移至 RibbonComboBox 上方時所顯示的提示文字。

ShowImage

取得或設定值,指出與 RibbonComboBox 關聯的影像是否可見。

ShowItemImage

取得或設定值,表示是否顯示下拉式功能表中項目的影像。

ShowLabel

取得或設定值,指出這個 RibbonComboBox 的標籤是否可見。

SizeString

取得或設定決定 RibbonComboBox 大小的字串。

SuperTip

取得或設定當使用者將游標移至 RibbonComboBox 上方時所顯示的多行提示文字。

Tag

取得或設定與這個 RibbonComponent 關聯的應用程式特定資料。

(繼承來源 RibbonComponent)
Text

取得或設定出現在這個 RibbonComboBox 中的文字。

Visible

取得或設定值,指出這個 RibbonControl 是否可見。

(繼承來源 RibbonControl)

方法

PerformDynamicLayout()

如果 RibbonComponent 具有動態功能表這類動態父代,而且未暫止配置,請呼叫父控制項的 Microsoft.Office.Core.IRibbonUI.InvalidateControl 方法。

(繼承來源 RibbonComponent)
PerformLayout()

如果 具有父代,而且未暫止配置,請呼叫 RibbonComponentMicrosoft.Office.Core.IRibbonUI.InvalidateControl。

(繼承來源 RibbonComponent)
ResumeLayout()

回復 SuspendLayout() 方法的效果。

(繼承來源 RibbonComponent)
ResumeLayout(Boolean)

回復 SuspendLayout() 方法的效果。

(繼承來源 RibbonComponent)
SuspendLayout()

防止 Microsoft Office 應用程式重新整理功能區上控制項的狀態。

(繼承來源 RibbonComponent)

事件

ItemsLoading

發生於開啟這個 RibbonComboBox 的下拉式清單時。

TextChanged

發生在使用者變更 RibbonComboBox 中的文字時。

適用於