Enum TabType

TabType

Énumération de tous les types d'onglets.

Pour appeler une énumération, vous appelez sa classe parente, son nom et sa propriété. Par exemple, DocumentApp.TabType.TAB.

Utilisez l'énumération TabType pour vérifier le type d'un élément donné, par exemple:

var tab = DocumentApp.getActiveDocument().getTab('t.0');
// Use getType() to determine the tab's type before casting.
if (tab.getType() == DocumentApp.TabType.DOCUMENT_TAB) {
  // It's a document tab, write some text to it.
  tab.asDocumentTab().setText('Hello World!');
} else {
 // There are currently no types other than DOCUMENT_TAB.
}

Propriétés

PropriétéTypeDescription
DOCUMENT_TABEnumType correspondant à DocumentTab.