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 に対応する型。