Office.RibbonUpdaterData interface
Specifies changes to the ribbon, such as the enabled or disabled status of a button.
Remarks
Requirement set: RibbonAPI 1.1
Properties
tabs | Collection of tabs whose state is set with the call of |
Property Details
tabs
Collection of tabs whose state is set with the call of requestUpdate
.
tabs: Tab[];
Property Value
Examples
// 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);
}
Collabora con noi su GitHub
L'origine di questo contenuto è disponibile in GitHub, in cui è anche possibile creare ed esaminare i problemi e le richieste pull. Per ulteriori informazioni, vedere la guida per i collaboratori.
Commenti e suggerimenti
https://aka.ms/ContentUserFeedback.
Presto disponibile: Nel corso del 2024 verranno gradualmente disattivati i problemi di GitHub come meccanismo di feedback per il contenuto e ciò verrà sostituito con un nuovo sistema di feedback. Per altre informazioni, vedereInvia e visualizza il feedback per