Office.RibbonUpdaterData interface

Gibt Änderungen am Menüband an, z. B. die aktivierte oder deaktivierte status einer Schaltfläche.

Hinweise

Anforderungssatz: RibbonAPI 1.1

Eigenschaften

tabs

Auflistung von Registerkarten, deren Zustand mit dem Aufruf von requestUpdatefestgelegt wird.

Details zur Eigenschaft

tabs

Auflistung von Registerkarten, deren Zustand mit dem Aufruf von requestUpdatefestgelegt wird.

tabs: Tab[];

Eigenschaftswert

Beispiele

// Office.Tab objects are properties of ribbon updater objects that are passed to the 
// Office.ribbon.requestUpdate method. The following shows how to set the visibility of 
// a custom contextual tab.

async function showDataTab() {
    await Office.ribbon.requestUpdate({
        tabs: [
            {
                id: "CtxTab1",
                visible: true
            }
        ]});
}

// The following does the same thing in TypeScript.

const showDataTab = async () => {
    const myContextualTab: Office.Tab = { id: "CtxTab1", visible: true };
    const ribbonUpdater: Office.RibbonUpdaterData = { tabs: [ myContextualTab ] };
    await Office.ribbon.requestUpdate(ribbonUpdater);
}