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 对应的类型。