次の方法で共有


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

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

プロパティの詳細

controls

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

controls?: Control[];

プロパティ値

注釈

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

id

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

id: string;

プロパティ値

string