Stay organized with collections
Save and categorize content based on your preferences.
TabType
An enumeration of all the tab types.
To call an enum, you call its parent class, name, and property. For example,
DocumentApp.TabType.TAB.
Use the TabType enumeration to check the type of a given element, for instance:
vartab=DocumentApp.getActiveDocument().getActiveTab();//UsegetType()todeterminethetab'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{//TherearecurrentlynotypesotherthanDOCUMENT_TAB.}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["`TabType` is an enumeration used to identify different tab types within a Google Doc."],["Currently, `DOCUMENT_TAB` is the only available tab type, representing a document tab that can be interacted with using the `DocumentTab` class."],["You can determine the type of a tab using `getType()` and then perform actions based on its specific type, such as adding text to a `DOCUMENT_TAB`."]]],[]]