Office.Group interface

リボン タブ上のコントロール グループを表します。

要件セット: RibbonApi 1.1

注釈

使用元

/**
 * Shows or hides a contextual tab.
 */
async function setContextualTabVisibility(visible: boolean) {
    // Define a tab group of controls.
    const group: Office.Group = {
        id: "TableToolsGroup",
        controls: [
            // The controls of the group...
        ],
    };
    
    // Update the ribbon to show or hide a tab with the specified group of controls.
    await Office.ribbon.requestUpdate({
        tabs: [
            {
                id: "contextTab1",
                visible: visible,
                groups: [group],
            },
        ],
    });
}

プロパティ

controls

グループ内の 1 つ以上のコントロール (メニュー項目、ボタンなど) を指定します。

id

マニフェストで指定されたグループの識別子。

visible

カスタム タブでコントロールのグループを表示するか非表示にするかを指定します。

プロパティの詳細

controls

グループ内の 1 つ以上のコントロール (メニュー項目、ボタンなど) を指定します。

controls?: Control[];

プロパティ値

注釈

Group オブジェクトが Office.RibbonrequestUpdate メソッドに渡された Office.RibbonUpdaterData オブジェクトの一部である場合、さまざまな Office.Group オブジェクトの controls プロパティによって、有効状態が変更されたコントロールが指定されます。Group オブジェクトの親 Tab オブジェクトの controls プロパティは無視されます。

id

マニフェストで指定されたグループの識別子。

id: string;

プロパティ値

string

visible

カスタム タブでコントロールのグループを表示するか非表示にするかを指定します。

visible?: boolean;

プロパティ値

boolean

注釈

要件セット: RibbonApi 1.3