Enum TabType

TabType

所有分頁類型的列舉。

如要呼叫列舉,您可以呼叫其父項類別、名稱和屬性。例如 DocumentApp.TabType.TAB

使用 TabType 列舉檢查特定元素的類型,例如:

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.
}

屬性

屬性類型說明
DOCUMENT_TABEnumDocumentTab 對應的類型。